Open

Description
To aid debugging, the errors retuned by the connection should distinguish between the peer closing the connection within a frame and between frames. Closing the connection without a close frame is abnormal, but the RFC does allow for that.
The error websocket.errUnexpectedEOF is retuned for both cases.
The two cases are easily distinguished by peeking for one byte at the beginning of advanceFrame.
There are two ways to distinguish the error:
- Return websocket.errUnexpectedEOF for the expected case and io.ErrUnexpectedEOF for the unexpected case.
- Create a new 1006 close error with status text "EOF" instead of "unexpected EOF".
Metadata
Metadata
Assignees
Type
Projects
Status
No status