Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE Exception code using my class
Message
 
À
22/08/2007 14:05:16
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01249645
Message ID:
01249693
Vues:
21
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform