| Dart Home | PowerTCP Winsock for ActiveX | Custom Development | Reply | PowerTCP Winsock for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Winsock for ActiveX Topic: Timeout, Winsock Tool, and Ping |
| thodgson From: Doylestown, PA USA Posts: 19 Member Since: 09/08/04 |
posted September 9, 2004 7:16 PM When using a blocking call to Ping in a multithreaded app, occassionally, one of the threads will indefinitely hang during the call to Ping. I am setting the timeout to a number less than 30,000 (ms). The environment is Visual C++ 6. If I should be using a non-blocking call in a multi-threaded environment, can you please provide a simple example? If I cannot use the Winsock tool in a multithreaded environment, please let me know that as well. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted September 9, 2004 11:19 PM Unfortunately it's very hard to diagnose multithreaded problems. If you can find a simple reliable way to duplicate the issue, please send the project to support@dart.com. Asynchronous usage is pretty straight forward. You set timeout to 0 and call the function. An event will fire to let you know what happened. Have you tried our just released Ping Enterprise Tool? It was designed for high performance pinging. Each Ping object runs in it's own thread too. |
| thodgson From: Doylestown, PA USA Posts: 19 Member Since: 09/08/04 |
posted September 9, 2004 11:22 PM You wrote: "Have you tried our just released Ping Enterprise Tool?" I didn't know it existed, but I will check it out. A workaround I am using is to create my own timer event which will call Abort() after a period of time. It works okay, but it isn't as "clean" as I'd like the overall solution to be. |
| thodgson From: Doylestown, PA USA Posts: 19 Member Since: 09/08/04 |
posted September 9, 2004 11:35 PM Before I leave this topic completely... What is so different between the Winsock tool and the Ping Enterprise Tool? The reason I ask is that I have multiple threads calling the Winsock Tool Ping object. Therefore, I don't think the Enterprise tool will help (unless it does something different when making multiple blocking calls it from multiple threads), since I don't need it to create multiple threads for me...just looking for advantages and a solid solution to my problem. |
Alex Gladshtein![]() From: Rome, NY USA Posts: 131 Member Since: 12/27/00 |
posted September 10, 2004 8:53 AM The Ping Enterprise Tool is designed to send a large number of pings over an extended period of time. Basically, if you need heavy duty 24/7 ping, the Ping Enterprise is designed for just that purpose. Thus, if you currently are creating a multi-threaded application to make a number of blocking pings, you could accomplish the same task more efficiently by using Ping Enterprise on one thread asynchronously and let us create multiple threads ourselves. |
| thodgson From: Doylestown, PA USA Posts: 19 Member Since: 09/08/04 |
posted September 10, 2004 9:09 AM But, if I _need_ to create my own threads and handle threading in my application, is the Enterprise tool more advantageous? If so, how? |
Alex Gladshtein![]() From: Rome, NY USA Posts: 131 Member Since: 12/27/00 |
posted September 10, 2004 9:25 AM If you are only planning to have a single ping occur in a blocking fashion on your thread, that limits what advantages Ping Enterprise will deliver. It is written using a totally different architecture than what is in the Winsock Tool, so you may find that it handles your scenario more robustly, but if you are not leveraging its multithreaded capabilities, then its feasability is limited. |
| Reply | PowerTCP Winsock for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|