$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [asio] Read timeout and failures
From: Mr. Robert G Palmer Jr. (robert.palmer_at_[hidden])
Date: 2011-03-16 21:00:36
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