Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Winsock error
Message
From
18/12/2000 10:25:32
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Winsock error
Miscellaneous
Thread ID:
00454681
Message ID:
00454681
Views:
76
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?
Next
Reply
Map
View

Click here to load this message in the networking platform