NDOJ/event_socket_server/__init__.py

12 lines
353 B
Python
Raw Permalink Normal View History

2020-01-21 06:35:58 +00:00
from .base_server import BaseServer
from .engines import *
from .handler import Handler
from .helpers import ProxyProtocolMixin, SizedPacketHandler, ZlibPacketHandler
def get_preferred_engine(choices=('epoll', 'poll', 'select')):
for choice in choices:
if choice in engines:
return engines[choice]
return engines['select']