FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to use :nTimeOut (TSocket)?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How to use :nTimeOut (TSocket)?
Posted: Wed Jun 11, 2008 04: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

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to use :nTimeOut (TSocket)?
Posted: Thu Jun 12, 2008 07:24 AM
Dutch,

nTimeOut is not needed for connection. Just check the returned value from method ConnectTo():
#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

Continue the discussion