ewebsock icon indicating copy to clipboard operation
ewebsock copied to clipboard

feat: Closed error code

Open dzmitry-lahoda opened this issue 8 months ago • 2 comments

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?

dzmitry-lahoda avatar Apr 11 '25 11:04 dzmitry-lahoda

I can PR this if in general it is viable and possibly acceptable.

dzmitry-lahoda avatar Apr 13 '25 13:04 dzmitry-lahoda

A PR would be nice!

emilk avatar Apr 13 '25 17:04 emilk