Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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.