0 disconnected 4 hostname is being resolved 6 connection setup in progress 7 healthy connection exists 8 connection close in progress 9 a communication error has occured 519 DMH protocol setup in progress (519 = &H100 Or 7)Based on this, you can try something like
lnStart = Seconds() do while ox.oSock.State = 6 and Seconds() - lnStart <= 5 && 5 seconds to timeout, bad if close to midnight!! doevents enddo ? 'Client State', ox.oSock.State if ox.oSock.State = 7 ox.oSock.SendData("This is a test.") endif