From: Chris R. <chr...@me...> - 2000-11-06 09:30:09
|
Clif Harden <cl...@di...> wrote: > > Has anyone tried the timeout option with perl-ldap. > > I believe I am having problems with it not working. > No matter what I set for a value it never times out. > > What is the time frame of the timeout option; seconds, > minutes, hours, etc. > > I have been programming for timeout being seconds. > > Regards, > > Clif Harden INTERNET: c-h...@ti... > The timeout you pass to Net::LDAP::new() is passed directly to the socket constructor (perldoc IO::Socket). As far as I can tell, it is used in connect() and accept() and it is measured in seconds (it is passed to alarm()). As these two calls can take up to 5 minutes to fail because of TCP timers, having a timeout shorter than this can be desirable. Connect() is used by clients when creating the connection to the server, accept() is used by servers. To provoke the 5 minute failure, you have to try to connect to an IP address of a machine outside of your subnet which doesn't exist. I've seen Linux do some funny things in this area, whereas Solaris for example behaves as expected. Cheers, Chris |