Open egmkang opened 4 years ago
End of file
is not an error, so OnError will not be called.....
I think OnError is not supposed to be called in this case.
@StormHub so how can i get the event, which the socket has been closed by remote
@StormHub http://think-async.com/Asio/asio-1.12.2/doc/asio/reference/async_read.html
system call read
return 0 may not be an error, but application want to know this event, this is important
Yep, I got the idea but now I am wondering how to expose this. For example, it could be a read complete with error or simply expose as error. Any preference from you?
all ways will be ok for me. thanks.
run sample EchoServer, and
telnet 127.0.0.1 9988
, and then close telnet windowthe sample will print
but
OnError
callback never be called.