You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! First of all thanks for the library, it's been really great to use.
Would you be open to adding a way for a WSMessageHandler to close the server stream with .close(code: closeCode) frames in some way or another? The typical use case is closing a WebSocket connection after some unrecoverable error while wanting the client-side to know what the error actually is–in JavaScript, for instance, you can read event.code on a WebSocket "close" event.
I could already implement this behavior by falling back to the more cumbersome WSHandler level, but it seems like a frequent enough use case that it would make sense at the WSMessageHandler level too.
The text was updated successfully, but these errors were encountered:
Hi! First of all thanks for the library, it's been really great to use.
Would you be open to adding a way for a
WSMessageHandler
to close the server stream with.close(code: closeCode)
frames in some way or another? The typical use case is closing a WebSocket connection after some unrecoverable error while wanting the client-side to know what the error actually is–in JavaScript, for instance, you can readevent.code
on a WebSocket"close"
event.I could already implement this behavior by falling back to the more cumbersome
WSHandler
level, but it seems like a frequent enough use case that it would make sense at theWSMessageHandler
level too.The text was updated successfully, but these errors were encountered: