Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/net/websocket: allow closing with custom error code and reason #4588

Closed
gopherbot opened this issue Dec 26, 2012 · 6 comments
Closed

x/net/websocket: allow closing with custom error code and reason #4588

gopherbot opened this issue Dec 26, 2012 · 6 comments
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@gopherbot
Copy link

by juhanipm:

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.
@rsc
Copy link
Contributor

rsc commented Dec 30, 2012

Comment 1:

Labels changed: added priority-later, removed priority-triage, go1.1.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 2:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 3:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 4:

Labels changed: added repo-net.

@mikioh mikioh changed the title go.net/websocket: allow closing with custom error code and reason x/net/websocket: allow closing with custom error code and reason Dec 23, 2014
@mikioh mikioh changed the title x/net/websocket: allow closing with custom error code and reason websocket: allow closing with custom error code and reason Jan 4, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title websocket: allow closing with custom error code and reason x/net/websocket: allow closing with custom error code and reason Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-net label Apr 14, 2015
@gdamore
Copy link

gdamore commented Dec 20, 2017

Hmm... does this implementation even send the close frame ever?

@ALTree ALTree added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Sep 26, 2019
@odeke-em
Copy link
Member

odeke-em commented Dec 31, 2019

I believe we froze the x/net/websocket package and instead recommend that users take a look at either of gorilla/websocket or @nhooyr's websocket
Screen Shot 2019-12-31 at 8 36 26 AM

thus this feature request won't be implemented. I shall there close this issue.

@golang golang locked and limited conversation to collaborators Dec 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

5 participants