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

Handling WebSocketClient's WS_OPCODE_CLOSE code #553

Open
neeeruuu opened this issue May 22, 2024 · 1 comment
Open

Handling WebSocketClient's WS_OPCODE_CLOSE code #553

neeeruuu opened this issue May 22, 2024 · 1 comment

Comments

@neeeruuu
Copy link

So sorry if there already is a way to do this, I couldn't find this one.

The onclose callback currently passes no arguments, could it be made so that it passes the error code sent by the server when the connection is closed (or 0/-1 for cases where the server didn't pass one or connection was closed locally)? Or have it written to hio's error.

@ithewei
Copy link
Owner

ithewei commented May 22, 2024

The ws CLOSE frame is not parsed, and no error code is exposed. If you need it, you have to modify the source code yourself.

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

No branches or pull requests

2 participants