How to use :nTimeOut (TSocket)?

How to use :nTimeOut (TSocket)?

Postby dutch » Wed Jun 11, 2008 4:29 am

I would like to know :nTimeOut meaning and how to use it. Because I have not know the the server activate after I start the client. TSocket client cannot know when the server re-activate again after down.

The :nTimeOut might be the way out.

Regards,
Dutch
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Postby Antonio Linares » Thu Jun 12, 2008 7:24 am

Dutch,

nTimeOut is not needed for connection. Just check the returned value from method ConnectTo():
Code: Select all  Expand view
#define SOCKET_ERROR    (-1)
...
if oSocket:ConnectTo( cIPAddr, nPort ) == SOCKET_ERROR
   MsgAlert( "can't connect to server!" )
endif
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 71 guests