From: Clif H. <cl...@di...> - 2000-11-07 16:21:26
|
> > 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 > Thanks Chris, So I take it the timeout only works on the initial connection to the directory server, it has nothing else to do with timeouts on searchs, etc. Timing out on searchs is the problem I need to solve, if there is no built-in timeout function in the Net::LDAP search methods I can easily write code to solve the problem. Regards, Clif Harden INTERNET: c-h...@ti... |