pyropy / fastapi-socketio

Easily integrate socket.io with your FastAPI app 🚀
Apache License 2.0
328 stars 31 forks source link

SocketManager: Add optional argument pass-through to socketio.AsyncServer constructor #14

Closed inactivist closed 3 years ago

inactivist commented 3 years ago

There are times when it may be necessary to be able to pass optional arguments to the AsyncServer constructor.

The current SocketManager constructor passes a fixed set of arguments when it initializes the _sio instance.

Perhaps an optional dict argument, socketio_server_args could be passed down into the AsyncServer constructor, as kwargs.

I'll try to work up a PR for this soon.

pyropy commented 3 years ago

I added async_mode argument that defaults to asgi. Take a look at #21 . Sorry because this took this long..

Let me know if that resolves your issue 😄