Search code examples
pythongevent

gevent multiple StreamServer listeners


I have daemon which has connection pool to handlerSocket. I have 2 types of clients and their protocol differs. I want to setup 2 listeners which handles each protocol and shares connection pool between them. In twisted this is relatively easy to accomplish, but couldn't find out how to do this in gevent. Thanks!


Solution

  • first instance of StreamServer could be started with: server.start() and second with server2.serve_forever()