def runServers(gatewayClients=[]): hub = MessageServerHub() for gatewayClient in gatewayClients: hub.registerGatewayClient(gatewayClient) if PARANOID: HTTPMB.PARANOID = 1 SocketMB.runSocketServer(hub=hub, useThread=1) HTTPMB.runHTTPServer(hub=hub, port=80) else: SocketMB.runSocketServer(hub=hub, useThread=1) HTTPMB.runHTTPServer(hub=hub, useThread=1) XMLRPCMB.runXMLRPCServer(hub=hub)
def MessageServer(): hub = MessageServerHub() SocketMB.runSocketServer(hub=hub, useThread=1) HTTPMB.runHTTPServer(hub=hub, useThread=1) XMLRPCMB.runXMLRPCServer(hub=hub, useThread=1) return hub