On 15/04/2014 16:04, quoth lx:Try it and see.
I want to know async_read or async_write can detect the tcp
connection has closed, or not?
Generally you should get an error callback for write if the connection has closed. You may or may not get one for read, depending on how the connection was closed. (Graceful shutdown or local connections typically will, unexpected remote disconnection typically won't.)
This is not unique to ASIO; it's how pretty much all TCP sockets work.
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users