def send(self, data):
"""send(data)
Send 'data' to remote."""
if self.compressor is not None:
data = self.compressor.compress(data)
data += self.compressor.flush(zlib.Z_SYNC_FLUSH)
if bytes != str:
self.sock.sendall(bytes(data, 'utf8'))
else:
self.sock.sendall(data)
评论列表
文章目录