
Hello, i'm using a tcp socket from asio 1.40 framework and i have the following behaviour : i establish a connection to a server and start receiving data i now want my software to be robust to server deconnexion/reset so i simulate it by shuting down the server equipment (which is an external hardware equipement) i would expect such operation to interrupt any pending async_read_some operation with an error code, but it doesn't is there some way to have the expected behaviour ? regards, Mathieu

i now want my software to be robust to server deconnexion/reset so i simulate it by shuting down the server equipment (which is an external hardware equipement)
i would expect such operation to interrupt any pending async_read_some operation with an error code, but it doesn't
is there some way to have the expected behaviour ?
If your server closes the socket gracefully, then your client's completion handler gets called with some error code (end of file or something like that).

And what if the connexion is not closed gracefully ? (which is the case i'm facing) Igor R a écrit :
i now want my software to be robust to server deconnexion/reset so i simulate it by shuting down the server equipment (which is an external hardware equipement)
i would expect such operation to interrupt any pending async_read_some operation with an error code, but it doesn't
is there some way to have the expected behaviour ?
If your server closes the socket gracefully, then your client's completion handler gets called with some error code (end of file or something like that). ------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Igor R
-
Mathieu Peyréga