http://www.purebasic.fr/english/viewtopic.php?t=32833
where Freak says:
I remember that OpenNetworkConnection() blocked the running flow of the program while trying to connect to the server side, and other times it returned inmediately, so yes, i request for a timeout to make OpenNetworkConnection() to return or to keep trying.(If you think OpenNetworkConnection() should have a timeout parameter, thats a feature request, not a bug.)

EDIT:
At the moment we are forced to make workarounds like:
Code: Select all
Procedure MyOpenNetworkConnection(*conn.UTCSafe)
*conn\connectionID=OpenNetworkConnection(*conn\UTCServer,*conn\port)
EndProcedure
Code: Select all
;... stuff ....
Connection.UTCSafe\UTCServer=UTC(t):Connection\port=port.w
Connection\connectionID=0
Thread.l=CreateThread(@MyOpenNetworkConnection(),@Connection.UTCSafe)
WaitWindowEvent(20)
If WaitThread(Thread,1000)=0:KillThread(Thread):EndIf
; ... more stuff...