def on_startup(self): NetworkSocket.server(NetworkSocket.SOCK_TCP, ('127.0.0.1', 65000)).register(self.on_new_connection, None, None, None, None)
def on_startup(self): self.serverSocket = NetworkSocket.server(NetworkSocket.SOCK_TCP, ('127.0.0.1', 65000)) self.serverSocket.register(self.on_readable, None, None, None, None)
def on_startup(self): self.sock = NetworkSocket.client(NetworkSocket.SOCK_TCP, ('www.yahoo.com', 80)) self.sock.register(self.on_readable, None, self.on_connected, self.on_end, self.on_end)
def on_startup(self): NetworkSocket.server(NetworkSocket.SOCK_TCP, ('127.0.0.1', 65000)).register( self.on_new_connection, None, None, None, None)