Interrupting Socket connect()

2 Nov
2009
2 Nov
'09
6:31 a.m.
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
5591
Age (days ago)
5591
Last active (days ago)
1 comments
2 participants
participants (2)
-
Jonathan Franklin
-
Simon Reye