def __init__(self, server, sock, address): WebSocket.__init__(self, server, sock, address) self.cookie = None self.lock = threading.Lock() self.current_game = None # should be None if not in a game self.id = ClientWSocket.count print("Client Socket Init {}".format(ClientWSocket.count)) ClientWSocket.count += 1
def __init__(self, server, sock, address, eventmanager): WebSocket.__init__(self, server, sock, address) self._logger = logging.getLogger(__name__) self.maxheader = 65536 self.maxpayload = 4194304 self.eventManager = eventmanager.instance self.eventManager.subscribe(FSEvents.ON_SOCKET_BROADCAST, self.on_socket_broadcast) self.eventManager.subscribe(FSEvents.ON_SOCKET_SEND, self.on_socket_send)
def __init__(self): WebSocket.__init__(self) self.numeroArea = -1
def sendMessage(self, data): WebSocket.sendMessage(self, json.dumps(data))
def __init__(self, *args): WebSocket.__init__(self, *args) self._engine = Engine()
#for i in range(1000000): # x=get_send_data() # print 'x:',x ####################################################################################### CLOSE = 0x8 listen_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #listen_socket.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1) listen_socket.bind(('127.0.0.1', 1507)) listen_socket.listen(1) sock, addr = listen_socket.accept() print 'connected by:', addr client = WebSocket(0, sock, addr) print 'Websocket created' Listeners = [sock.fileno()] connections = {} connections[sock.fileno()] = client send_time = datetime.datetime.now() send_tick = datetime.timedelta(seconds=1) while True: rList, wList, xList = select.select(Listeners, Listeners, Listeners, 7) if not (rList or wList or xList): continue for r in rList: zc = connections[r] zc._handleData() while zc.sendq:
def __init__(self, server, sock, address): self.subject = None WebSocket.__init__(self, server, sock, address)
def __init__(self, server, sock, address): self.role = Role.NOT_SET WebSocket.__init__(self, server, sock, address)
def __init__(self): WebSocket.__init__(self) Logger.__init__(self)
def __init__(self, *args, **kwargs): WebSocket.__init__(self, *args, **kwargs) _thread.start_new_thread(self.listen, ())
def __init__(self, server, sock, address): WebSocket.__init__(self, server, sock, address) self.qira = qiraplugin_t() idaapi.msg("[%s] Starting QIRA web...\n" % (self.qira.comment,))
def __init__(self, server, sock, address): WebSocket.__init__(self, server, sock, address) pass
def __init__(self, server, sock, address): WebSocket.__init__(self, server, sock, address) # 联通解析开关 True:开启 False:关闭 self.unicom = False
def __init__(self, server_, sock, address): WebSocket.__init__(self, server_, sock, address) self.connectionType = "none"