$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] Interrupting Socket connect()
From: Simon Reye (simon.reye_at_[hidden])
Date: 2009-11-02 01:31:39
If I have a socket like so:
boost::asio::ip::tcp::socket tcpSocket;
and call connect in a boost::thread like so:
tcpSocket.connect(endPoint, error);
It will 'hang' for up to 30 seconds if it can't immediately connect to the
end point.
If I interrupt() and join() the boost thread it has to wait for the
connect() call to finish.
Is there a way to cancel or interrupt the connect() call?
Thanks
Simon