Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Winsock error
Message
 
To
18/12/2000 10:25:32
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00454681
Message ID:
00455112
Views:
33
I was working exactly on the same type of problem yesterday, I have posted a file in the file section. It is called WinSckSvr.Zip, it contains a class to wrap the server side connections to Winsock. It should be available soon since i just posted it.

>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?
Previous
Reply
Map
View

Click here to load this message in the networking platform