How to use :nTimeOut (TSocket)?

Post Reply
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

How to use :nTimeOut (TSocket)?

Post by dutch »

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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Dutch,

nTimeOut is not needed for connection. Just check the returned value from method ConnectTo():

Code: Select all

#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
Post Reply