Using boost::asio::write() boost::system::error_code never gets set?

Documentation on write says it will throw on error. The problem in your code is that you declare the error variable inside the try . In the documentation, it says the error variable is set to indicate what error ocurred.

Try to declare the error variable outside the try block.

The exception was NOT thrown by write(). Had a later call to get the remote IP from the endpoint (after the client had shutdown/closed the socket) that was the one throwing this: Transport endpoint is not connected Exception Type: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12syst­em_errorEEEEE. So that's the end of that mystery, sort of.

Still don't know why the error would not be set on write...write appears to not fail.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions