class ClientNetworkSetup (Engine): # Sets up the network for the client. # Constructor {{{1 def __init__ (self, loop): print 'C: Network setting up.' Engine.__init__ (self, loop) host = network_settings.host port = network_settings.port callback = self.connected self.client = PickleClient (host, port, callback) def setup (self): pass # Update, Callback, and Methods {{{1 def update (self, time): self.client.connect() def connected(self, pipe): print 'C: Client connected.' self.exit_engine() def successor (self): return ClientPregame(self.loop, self.client) def teardown (self): pass
def __init__ (self, loop): print 'C: Network setting up.' Engine.__init__ (self, loop) host = network_settings.host port = network_settings.port callback = self.connected self.client = PickleClient (host, port, callback)