Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Winsock error
Message
De
18/12/2000 10:25:32
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Winsock error
Divers
Thread ID:
00454681
Message ID:
00454681
Vues:
77
I make server-client messenger program with winsock ocx.

1. I'm coding server side form init event,

thisform.winsock1.localport=7000
thisform.winsock1.listen

2.I'm coding server side form connectionrequest event,
ThisForm.winsock1.Accept(requestid)

3.I'm coding server side form dataarrival event,
cRecvData = ""
This.GetData(@cRecvData, 8, bytestotal)
wait wind cRecvData nowait


4. I'm coding client side form init event,
ThisForm.winsock1.RemoteHost = "xxx.xxx.xxx.xxx"
ThisForm.winsock1.Remoteport = 7000
If ThisForm.winsock1.State<>0
ThisForm.winsock1.OBJECT.Close()
EndIf

ThisForm.winsock1.OBJECT.Connect()
If ThisForm.winsock1.State=7
wait wind "connected!" nowait
else
wait wind "NO connected" nowait
endif
ThisForm.winsock1.SendData("test")
ThisForm.winsock1.OBJECT.Close()



But, when client side coding is processing,
=> ThisForm.winsock1.OBJECT.Connect()

server side form send error message like this,

"OLE IDispatch exception code 0 from winsock: Invalid operation at current
state.... "

what's problem?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform