[futurebasic] Re: [FB] TCP Connection State

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 1999 : Group Archive : Group : All Groups

From: Sean -G3- <mclaughlin@...>
Date: Sun, 27 Jun 99 19:45:24 -0400
>You are finding the TCP state.
>theStatus = FN TCPConnectionStatus%(@gTCPcon) is
>the correct method.   You are making the assumption that when you are
>unexpectedly disconnected from the server
>that you'll get a TCPstate of 0 or 99, and I'm not sure that is a valid
>assumption.  Once you have established the connection, any state other
>than 8 is bad, so you might try checking for that value instead.

I tried this as well, and it didn't work:

      theStatus = FN TCPConnectionStatus%(@gTCPcon)
      LONG IF theStatus <> 8
        gExchangeStep = _closeTCPconnection
      END IF

theStatus is always equal to "1", even if I've been connected and active 
on a server for five minutes or so.