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
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 26, 2012

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 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 rsc commented Nov 27, 2013

Comment 2:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

@rsc rsc commented Dec 4, 2013

Comment 3:

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

@rsc
Copy link
Contributor

@rsc 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 gdamore commented Dec 20, 2017

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

@odeke-em
Copy link
Member

@odeke-em 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.

@odeke-em odeke-em closed this Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.