NativeWebSocket
NativeWebSocket copied to clipboard
Websockets OnClose doesn't contain the close message
When a websocket closes, they contain a reason for close, additionally they contain a message. Currently this libraries OnClose delegate just emits the reason enum and not a message too.
It also does not support sending back user-defined status codes during the closing handshake. Instead, NativeWebSocket passes an undefined WebSocketCloseCode to the event listener :(
More about user-defined status codes here: https://www.rfc-editor.org/rfc/rfc6455#section-7.4.2