
17 Mar
2011
17 Mar
'11
2 a.m.
I'm running boost v1.45 on WindowsXP SP3 I've read all the stuff on using async reads if you want a timeout and I'm going to switch to the from my current synchronous read code. However, I have a question regarding failures. I have been using a synchronous read_some() call. This states that it will return/throw an error/exception on an error condition. If I'm connected on a TCP socket to another device and I UNPLUG the network cable, does this not shutdown the socket and shouldn't the read_some() return/throw an error/exception. Unplugging the cable seems like an error condition to me, but in my case, the code just hangs at the read_some() call and never returns. Thanks, -- Robert G. Palmer, Jr. Ingenutec, LLC