Hi Gavin,
Also note that depending on the type of break, it may take a long time (>=30 seconds in some cases) to get an error when sending.
I have spent weeks to debug this problem, I waited many minutes, the program kept sending to broken connection, but no error occurred. That is real behavior of the boost socket, isn't? My connection class is able to keep connection peioridcally until it is connected, but that feature only works in first time connection, once it was connected, to close the socket, to re-open the socket, to start connection again, it never works. Here is what I test: - Connect to Ethernet cable, start asio socket application to initialize connection, it handle failure unit it is connected, then it can send data to server without any problems. - During the application is running, pull Ethernet cable out, a function to check network interface to find failure of Ethernet but WiFi was good, closed the socket, start reconnection, the socket was opened again, the connection was successful, but sending message to socket got an error of "stream truncated", in error handler, it kept calling the reconnection again, it was no longer to work. Appreciate any advice how to get that work. Thank you. Kind regards, - jh