Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE Exception code using my class
Message
 
To
22/08/2007 14:05:16
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01249645
Message ID:
01249693
Views:
20
Jay,

I found a better list of states
  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
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform