
10 Jul
2011
10 Jul
'11
10:22 a.m.
Ah, the other version did, but this one doesn't. I misunderstood and thought HandleWrite was only bound to the error occurrence. I only want the connection to live through one send and one reply, but if I understand you correctly I have to beg it to stay alive long enough for the reply to go out?
If you don't need it anymore, you don't have to... I don't see where your server code receives anything, but anyway, if all you need is to ensure that the data being sent with async_write won't be discarded due to socket closing, I believe you can just set linger option: http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/reference/socket_ba...