Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working with sockets
Message
From
15/08/2008 15:53:47
 
 
To
15/08/2008 14:24:25
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01339151
Message ID:
01339227
Views:
24
>>Hi Mark,
>>
>>>Any idea is how to hanlde connection failures on VFP side?
>>
>>OK, next attempt. <g>
>>
>>How are you accessing the socket from VFP? It sounds a bit like you have a blocking issue. Switching to non-blocking or asynchronous sockets would be one option to get around this.
>>
>>Another one would be to move the socket code into a VFP COM EXE server. In the COM server perform the socket operation in a timer. This way any method call can return directly and the action is carried out in an asynchronous fashion. It doesn't prevent the COM server from blocking. But at least your application would remain responsive and is able to kill the process of the COM server. After that you can create another COM instance.
>
>I am using a winsock control, I have a few VFP EXEs connecting to the same socket as well VFP processes with dedicated sockets all from .Net.
>
>By failure I meant if I close .Net EXE that serves sockets than all VFP programs start eating 100% of CPU reardless wheather I am actually trying to send any data or not. In the simplest, I start .Net exe, sockets are ready, start VFP programs, connections are established, close .Net and VFP takes 100% CPU.

I guess you are using TCP. How about switching to use UDP?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform