Programmatically
Member
- Joined
- Feb 2, 2008
- Messages
- 8
- Programming Experience
- 5-10
Hey.. I'm back again.. Thank you before i even get started to anyone who helps me with this issue..
I'm running a multithreaded program.. I have 10 threads running Sockets checking domains for uptime.. I'm trying to find out the best way to run a timer for the connection. I don't like the built in socket timeouts very much.. Seems to not timeout at the times i want.. I want to give a socket up to 1 minute to try and establish a connection with the domain.. If it suprasses 1 minute i want the thread to be halted and restarted with the next domain.
i've dabbled with the timer class, but it doesn't seem to run on it's own instance outside the thread.. if i call ConnectSocket() -- it doesn't override the thread and cut it off.. it waits until the ConnectSocket() is done.. then it allows it to work again.. Should i run timer control instances for this? Should i just use the socket timeouts.. are there any tools/tips that i'm not using.. Please help!
I'm running a multithreaded program.. I have 10 threads running Sockets checking domains for uptime.. I'm trying to find out the best way to run a timer for the connection. I don't like the built in socket timeouts very much.. Seems to not timeout at the times i want.. I want to give a socket up to 1 minute to try and establish a connection with the domain.. If it suprasses 1 minute i want the thread to be halted and restarted with the next domain.
i've dabbled with the timer class, but it doesn't seem to run on it's own instance outside the thread.. if i call ConnectSocket() -- it doesn't override the thread and cut it off.. it waits until the ConnectSocket() is done.. then it allows it to work again.. Should i run timer control instances for this? Should i just use the socket timeouts.. are there any tools/tips that i'm not using.. Please help!