def create_server(): def retObj(): return A(10) server = TcpRpcServer('127.0.0.1', 10004) server.regist(retObj) server.serve()
def create_server(): from agileutil.rpc.server import TcpRpcServer from agileutil.rpc.compress import RpcCompress RpcCompress.DEBUG = True RpcCompress.enableCompressLen = 200 server = TcpRpcServer('127.0.0.1', 10019) server.regist(sayHello) server.serve()
def create_server(): from agileutil.rpc.server import TcpRpcServer def retObj(): return A(10) server = TcpRpcServer('127.0.0.1', 10004) server.regist(retObj) server.serve()
def create_server(): disconf = DiscoveryConfig(consulHost=CONSUL_HOST, consulPort=CONSUL_PORT, serviceName='test-rpc-server', serviceHost=local_ip(), servicePort=10001) server = TcpRpcServer('0.0.0.0', 10001) server.setDiscoverConfig(disconf) server.regist(sayHello) server.serve()
#coding=utf-8 from agileutil.rpc.server import TcpRpcServer from agileutil.db4 import PoolDB db = PoolDB('127.0.0.1', 3306, 'root', '', 'test2') db.connect() def sayHello(name): sql = 'select * from nation limit 100000' rows = db.query(sql) return 'hello ' + name nationServer = TcpRpcServer('0.0.0.0', 9988) nationServer.regist(sayHello) nationServer.serve()
def create_server(): server = TcpRpcServer('127.0.0.1', 9988) server.regist(sayHello) server.serve()
def create_server(): server = TcpRpcServer('127.0.0.1', 10022) server.regist(TestService) server.serve()
def create_server(): RpcCompress.DEBUG = True RpcCompress.enableCompressLen = 200 server = TcpRpcServer('127.0.0.1', 10019) server.regist(sayHello) server.serve()
def create_server(): server = TcpRpcServer('127.0.0.1', 10014) server.regist(testTimeout) server.regist(sayHello) server.serve()
def create_server_10007(): server = TcpRpcServer('127.0.0.1', 10007) server.regist(sayHello) server.serve()
def create_server(): from agileutil.rpc.server import TcpRpcServer server = TcpRpcServer('127.0.0.1', 9988) server.regist(sayHello) server.serve()
def create_server(): from agileutil.rpc.server import TcpRpcServer server = TcpRpcServer('127.0.0.1', 10014) server.regist(testTimeout) server.regist(sayHello) server.serve()