Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble with WinSock, what´s happening here?
Message
From
25/04/2005 19:58:55
Walter Meester
HoogkarspelNetherlands
 
 
To
25/04/2005 10:03:04
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01006357
Message ID:
01008292
Views:
51
This message has been marked as the solution to the initial question of the thread.
Hi pablo,

What I would do is enable a timer that sends a PING to the server every 2 seconds or so.
The timer would set a flag "Pingstatus" to "Sent"

In the data arrival, you would set same property "Answer recieved"

When the timer is fired for at least the second time, and the "pingstatus" property is set to "Sent", it means you never got an answer to the sent "PING", and you can assume that the server has been shut down.

Good luck,

Walter,


SNIP

>What is the problem here, then?

The problem is that you're sending a "PING", but the procedure never goes into a wait state so that the DataArrival event can be processed. You can use a DOEVENTS in the loop, but it really is a dirty solution here I personally would not rely on.

Walter,
Previous
Reply
Map
View

Click here to load this message in the networking platform