Francis Cianfrocca
11/12/2007 12:26:00 AM
Note: parts of this message were removed by the gateway to make it a legal Usenet post.
On 11/11/07, Lee Jarvis <jarvo88@gmail.com> wrote:
>
> I am using a TCPSocket and I want the script to restart if the
> connection times out. I have tried doing it myself and searched around
> everywhere for a solution but I have had no luck.. Any help would be
> great
What do you mean by "the connection times out"? Do you mean that the
connection has no read or write activity for some interval of time?
If you need to do that, then the Ruby/EventMachine library has that ability.
You'll need to rearrange your code to go this route, so perhaps someone else
will have a less invasive solution. If not, then look at EventMachine.