Ejemplo n.º 1
0
def main(args):
    listener = Listener()
    listener.append_service(RemoteErrorImpl())
    channel = ServerChannel(PBHandler(listener))
    channel.listen(args.address)
    channel.start()
    pymaid.serve_forever()
Ejemplo n.º 2
0
def main():
    listener = Listener()
    listener.append_service(RemoteErrorImpl())
    channel = ServerChannel(PBHandler, listener, parser=PBParser)
    channel.listen(("127.0.0.1", 8888))
    channel.start()
    pymaid.serve_forever()
Ejemplo n.º 3
0
def main():
    channel = ServerChannel(handler)
    channel.listen('/tmp/hello.sock')
    channel.start()
    try:
        pymaid.serve_forever()
    except:
        print(len(channel.connections))
Ejemplo n.º 4
0
def main(args):
    channel = ServerChannel(handler)
    channel.listen(args.address)
    channel.start()
    try:
        pymaid.serve_forever()
    except:
        print(len(channel.connections))
Ejemplo n.º 5
0
def main(args):
    listener = Listener()
    listener.append_service(HelloServiceImpl())
    channel = ServerChannel(PBHandler(listener))
    # channel.listen(('localhost', 8888))
    channel.listen(args.address)
    channel.start()
    try:
        serve_forever()
    except Exception:
        print(len(channel.connections))
        print(greenlet_pool.size, len(greenlet_pool.greenlets))
Ejemplo n.º 6
0
def main():
    listener = Listener()
    listener.append_service(HelloServiceImpl())
    channel = ServerChannel(PBHandler, listener, parser=PBParser)
    #channel.listen(('localhost', 8888))
    channel.listen('/tmp/hello_pb.sock')
    channel.start()
    try:
        serve_forever()
    except:
        print(len(channel.connections))
        print(greenlet_pool.size, len(greenlet_pool.greenlets))
Ejemplo n.º 7
0
def main():
    listener = Listener()
    listener.append_service(ChatServiceImpl())
    channel = ServerChannel(PBHandler, listener, parser=PBParser)
    channel.listen(("127.0.0.1", 8888))
    channel.start()
    try:
        pymaid.serve_forever()
    except:
        import traceback
        traceback.print_exc()
        print(len(channel.connections))
        print(greenlet_pool.size, len(greenlet_pool.greenlets))
Ejemplo n.º 8
0
def main(args):
    listener = Listener()
    listener.append_service(ChatServiceImpl())
    channel = ServerChannel(PBHandler(listener))
    channel.listen(args.address)
    channel.start()
    try:
        pymaid.serve_forever()
    except Exception:
        import traceback
        traceback.print_exc()
        print(len(channel.connections))
        print(greenlet_pool.size, len(greenlet_pool.greenlets))