Skip to content

net: how can we know whether TCPConn is active? #12265

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

Closed
saturn4er opened this issue Aug 21, 2015 · 2 comments
Closed

net: how can we know whether TCPConn is active? #12265

saturn4er opened this issue Aug 21, 2015 · 2 comments

Comments

@saturn4er
Copy link

How can I know that server close connection with my program? Stackoverflow say that I should check it by conn.Read(&[]byte{0}). Is it Workaround?

@mikioh mikioh changed the title If TCPConn is active? net: how can we know whether TCPConn is active? Aug 21, 2015
@mikioh mikioh added this to the Unplanned milestone Aug 21, 2015
@bradfitz
Copy link
Contributor

Let's move this discussion to the golang-nuts mailing list. We only use our issue tracker for tracking bugs and outstanding TODO items.

@mikioh
Copy link
Contributor

mikioh commented Aug 21, 2015

@saturn4er,

Please take a look at https://github.com/golang/go/blob/master/CONTRIBUTING.md, and please use golang-nuts instead.

I should check it by conn.Read(&[]byte{0}). Is it Workaround?

I think it doesn't work when your socket is configured with TCP fast open protocol. In general, most simple and reliable way is just implementing own, your application-level handshake protocol.

@golang golang locked and limited conversation to collaborators Aug 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants