def __init__(self, sock, config = None):
asyncore.dispatcher.__init__(self, sock)
self.connected = True
self.other = None
self.logger = None
self.timeout = None
self.send_hook = None
self.buffer=[]
self.rcvbuf=[]
self.max_count = getattr(config,'count',0)
logpath = getattr(config,'logfile',None)
if logpath:
logpath=re.sub("TIMESTAMP",start_timestamp,logpath)
self.logfile = open(logpath, "a")
else:
self.logfile = None
评论列表
文章目录