Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/net/websocket: allow closing with custom error code and reason #4588
Feature request: Allow closing a websocket connection with a custom error code and a reason. Perhaps by adding a method like: func (c *Conn) CloseReason(code int, reason string) error Some client programs (eg. SockJS) depend on specific error codes or reasons that cannot be set right now.