Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to limit which transports the server should accept #259

Closed
FT-JMendyk opened this issue Oct 4, 2021 · 0 comments
Closed

Option to limit which transports the server should accept #259

FT-JMendyk opened this issue Oct 4, 2021 · 0 comments
Assignees

Comments

@FT-JMendyk
Copy link

Is your feature request related to a problem? Please describe.
Due to performance reasons, in my system exposing socket.io server, clients are expected to use only the non-polling websocket transport. As such, I would like to stop users from successfully connecting to my system if they attempt to connect using the polling transport.

Describe the solution you'd like
The Javascript and Java Socket.IO libraries provide an option in the Server's constructor to specify transports that will be allowed on the server-side:

I suggest adding an argument for Server's constructor, defining which transports should the server accept.
Should the client connect with a transport outside of the list of accepted ones, the server should respond with an informative error message.

Describe alternatives you've considered
If client is allowed to connect with polling transport, it will cause substantial performance issues, or even lead to (not easily relatable to the cause) exceptions inside python-engineio in specific cases. Thus providing an option to limit supported transports in the server seems like the only solution.

Additional context
As far as I am concerned, implementing this issue might require changes in python-engineio. However, since I am interested in setting allowed transports in socket.io server, I decided to create feature request here.

@miguelgrinberg miguelgrinberg self-assigned this Oct 4, 2021
@miguelgrinberg miguelgrinberg transferred this issue from miguelgrinberg/python-socketio Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants