
15 Nov
2008
15 Nov
'08
8:07 p.m.
"Ken zhang"
I want to handle socket close event in my connection, but I can't found mothed in ip::tcp::socket,How can I handle close event for socket?
Hello Kennir, If you have an outstanding read request, when the socket is closed the read handler will be called with an error indication. In my own code I've seen these errors returned when a socket is closed: boost::system::errc::no_such_file_or_directory: boost::asio::error::shut_down: Hope this helps, ----Scott.