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

Open
gopherbot opened this issue Dec 26, 2012 · 5 comments

Comments

@gopherbot
Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Dec 30, 2012

Comment 1:

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

Status changed to Accepted.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Nov 27, 2013

Comment 2:

Labels changed: added go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 3:

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

@rsc

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

commented Dec 20, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.