def connect_to(self,endpoint):
""" Use this to connect to the server if an endpoint is not passed in __init__
"""
self.tcp_sock = eventlet.connect(endpoint)
self.cipher = crypto.Cipher()
self.recv_buff = buffer.Buffer()
self.compression_enabled = False
self.protocol_mode = 0 # did you really think it made sense to set this to anything else you maniac?
self.send_q = eventlet.queue.LightQueue(0)
self.ready = True
self.pool.spawn_n(self.read_thread)
self.pool.spawn_n(self.send_thread)
评论列表
文章目录