SOCK_TCPCONNECT locks up if destination not listening for connections

Previous topic - Next topic

FutureCow

SOCK_TCPCONNECT locks up if the remote end isn't listening for connections on the port number specified. There doesn't appear to be any way to make it time out or break the connection attempt.

From what I've read on the internet (this was the most authoritative page I could find - http://www.opengroup.org/onlinepubs/000095399/functions/connect.html), it appears that it should either fail, or fail but then connect asyncronously (in which case a command to break the connection attempt after a timeout period would be wonderful - even better would be to have that handled automatically internally!!!).

As it is currently, my program just locks up at the connection attempt and doesn't return.
Source code in post : http://www.glbasic.com/forum/index.php?topic=4270.0

MrTAToad

I presume it doesn't have a really long time-out ?

FutureCow

I left it for a long time - the window shows as "not responding".