Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gevent multiple StreamServer listeners

Tags:

python

gevent

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!

like image 473
frx Avatar asked Dec 15 '25 12:12

frx


1 Answers

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

like image 73
frx Avatar answered Dec 19 '25 07:12

frx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!