IO::Socket default timeout

IO::Socket default timeout

am 25.09.2006 20:35:36 von acotto

What is the default timeout for an IO::Socket?

I've tried printing out $socket->timeout(); to check, but unless I
explicitly specify a timeout in the Socket constructor,
$socket->timeout() doesn't return anything. There's nothing in the
perldoc about the default timeout.

Thanks,
-Andrew

Re: IO::Socket default timeout

am 29.09.2006 19:08:06 von nobull67

acotto@gmail.com wrote:
> What is the default timeout for an IO::Socket?
>
> I've tried printing out $socket->timeout(); to check, but unless I
> explicitly specify a timeout in the Socket constructor,
> $socket->timeout() doesn't return anything. There's nothing in the
> perldoc about the default timeout.

That's because there's no default timeout.

The IO::Socket timeout us the time after which IO::Socket gives up
waiting for the OS's socket library to complete an operation.

By default IO::Socket never gives up waiting for the OS's socket
library to complete an operation. Eventually, however, the underlying
OS will give up. After how long, and how this is configured is, AFAIK,
an OS issue.