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

Handle proxy events properly #373

Merged
merged 5 commits into from
Feb 9, 2023
Merged

Handle proxy events properly #373

merged 5 commits into from
Feb 9, 2023

Conversation

Atrue
Copy link
Collaborator

@Atrue Atrue commented Feb 9, 2023

Atrue added 5 commits February 7, 2023 16:27
to make sure all the tests have the correct state when called.
afterEach do not reset the state after failed tests
The `close` and `error` events are not fired when the server shuts down.

The `message` event is the only event handled differently for the server-side socket and WebSocket client, as it's the handler for the message sent from the client to the server so it should have another event type `server::message`. Other events like `close` and `error` are fired and handled at the same time so no reason to have a special event here.

Make the `server::message` the only special event for the `on` handlers for the server-side sockets and use the same type of listeners for other types to handle all the events properly
To have consistency with the `on` method
@Atrue Atrue merged commit a3c3866 into master Feb 9, 2023
@Atrue Atrue deleted the handle-proxy-events branch February 9, 2023 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Typescript] Client.addEventListener and Server.addEventlistener has wrong typing
1 participant