def handle_incoming_client_data(self, clientsock): msgs = message.recvMessage(clientsock) if not msgs: self.handle_disconnecting_client(clientsock) else: for msg in msgs: print "Incoming client message:", msg self.gameserver.handleClientMessage(self.clientsockets[clientsock], msg)
def selectRead(readsock): self.server_is_silent = False msgs = message.recvMessage(readsock) if not msgs: self.sock.close() self.connected = False print "Disconnected from server" else: for msg in msgs: print "Incoming server message:", msg msg.handleMessageForClient(self)