Exemplo n.º 1
0
 def get_service(self):
     factory = ServerFactory()
     factory.protocol = SimpleTelnetSession
     factory.game = self.game
     service = internet.TCPServer(self.options.getint('port'), factory)
     service.setName("SimpleTelnetServer")
     return service
Exemplo n.º 2
0
def AMP_server(game, port):
    factory = ServerFactory()
    factory.protocol = AMPServerProtocol
    factory.game = game
    service = internet.TCPServer(port, factory)
    service.setName("AMPServer")
    return service