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

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

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

Comments

Projects
None yet
4 participants
@saturn4er
Copy link

commented Aug 21, 2015

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

This comment has been minimized.

Copy link
Member

commented Aug 21, 2015

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

@bradfitz bradfitz closed this Aug 21, 2015

@mikioh

This comment has been minimized.

Copy link
Contributor

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.
You can’t perform that action at this time.