def __init__(self, connection):
connection.setblocking(0)
#//fcntl.fcntl(connection.fileno(), fcntl.F_SETFD, os.O_NONBLOCK)
# somehow it's much slower to baseclass ?!?
#super(LineBufferedNonBlockingSocket, self).__init__(connection.fileno())
self.b = linebuffer.LineBuffer(connection.fileno())
self.socket = connection
self.out_buffer = ''
self.pollout = select.poll()
self.pollout.register(connection, select.POLLOUT)
self.sendfail_msg = self.sendfail_cnt = 0
评论列表
文章目录