ewebsock
ewebsock copied to clipboard
feat: Closed error code
When I close connection on tokio server I provide next:
pub struct CloseFrame {
/// The reason as a code.
pub code: u16,
/// The reason as text string.
pub reason: Utf8Bytes,
}
When I receive message using ewebsock I get next:
Closed
It is possible to have Closed(Option<u16>)? Or there is some known limitation of RFC or consistency of impls?
I can PR this if in general it is viable and possibly acceptable.
A PR would be nice!