FAQ
In this sample code, I forced client to sleep 3 seconds then write data to
server.
And in server side, it read and wait 1 second at most.

I think the server side have already closed the socket.
But, why client side still write to socket without any error code returned?

code: http://play.golang.org/p/bujqJsivON

2013/05/07 15:05:05.554646 srv.go:74: cli sleep 3 seconds
2013/05/07 15:05:06.555119 srv.go:58: Err: srv read read tcp
127.0.0.1:18888: i/o timeout
2013/05/07 15:05:06.555199 srv.go:50: srv close conn
2013/05/07 15:05:06.557232 srv.go:41: srv close listener
2013/05/07 15:05:08.555172 srv.go:76: cli will write
2013/05/07 15:05:08.555407 srv.go:82: cli wrote 9 bytes
2013/05/07 15:05:08.555428 srv.go:71: cli close sock

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMay 7, '13 at 7:15a
activeMay 7, '13 at 1:44p
posts2
users2
websitegolang.org

2 users in discussion

Dlin: 1 post James Bardin: 1 post

People

Translate

site design / logo © 2022 Grokbase