Hello,
> how does B instantiate a StreamServer?
>
> at least RyuApp.__init__ should not block forever.
The code structure is like:
class B(Ryu.app):
def __init__(self):
server = Server(handler)
g = hub.spawn(server)
g.wait()
class Server(object):
def __init__(self, handler):
self.handler = handler
def __call__(self):
self.server_loop()
def server_loop(self):
server = StreamServer(('0.0.0.0', 1234), self.handler)
server.serve_forever()
Any problem with it?
Best regards,
Can Zhang
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel