Skip to content

socket-io: Do events on same socket support concurrency? #82

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

Open
laagland opened this issue Oct 20, 2023 · 1 comment
Open

socket-io: Do events on same socket support concurrency? #82

laagland opened this issue Oct 20, 2023 · 1 comment
Labels
question Further information is requested

Comments

@laagland
Copy link

Hi,

It seems like concurrent handling of events on the same socket is not working.
If a specific client sends multiple events to the server, events are only handled if the previous event is completely finished.
This is not expected behavior and my implementation is not very complex.
Is this a bug? Or could it be that my own code is the culprit.

Thanks

@njones njones added the question Further information is requested label Jan 23, 2024
@njones njones changed the title Concurrency not working for events on same socket? socket-io: Do events on same socket support concurrency? Jan 23, 2024
@njones
Copy link
Owner

njones commented Jan 23, 2024

All tests are done to support running concurrently, and this includes sending multiple events to the same socket.

go test -timeout 40s -run ^TestServerV4/sending_to_all_connected_clients.Polling$ github.com/njones/socketio -race -v

If this test doesn't cover the case you are expecting can you please update this question with an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants