Re: Released perl-ldap 0.54
[email protected] (Quanah Gibson-Mount) Wed, 03 Apr 2013 09:58:36 -0700
| Newsgroups | perl.ldap |
|---|---|
| Message-ID | <5BC37CF751292FA57F47222C@[192.168.1.26]> |
--On Friday, March 29, 2013 7:14 PM +0100 Peter Marschall <[email protected]> wrote: > Hi Quanah, > > On Friday, 29. March 2013, Quanah Gibson-Mount wrote: >> Do you have plans to add the linux TCP keepalive bits I noted in a future >> release? > > I am very much in doubt about the Linux specific TCP keepalive bits. > I'd rather keep perl-ldap independent of specific OS peculiarities. > > Net::LDAP exposes the socket it uses via the socket() method. > Can't this be used to implement the things on the application side? Hi Peter, In doubt about what exactly? If you look at the patch I wrote, it does nothing unless the related perl module is installed. Any application that used Net::LDAP (such as Amavis) can then trivially set the parameters in its setup block for Net::LDAP, and it will work without error on any system, regardless of whether or not the enhanced keepalive bits are available. In fact, that's exactly what I patched amavis to do: my $ldap = Net::LDAP->new($self->{hostname}, localaddr => $self->{localaddr}, port => $self->{port}, scheme => $self->{scheme}, version => $self->{version}, timeout => $self->{timeout}, keepalive => 1, keepalive_idle => 240, keepalive_interval => 30, keepalive_probe => 10, ); This allows amavis to set keepalive on any platform. If the platform doesn't support the enhanced directives, Net::LDAP just ignores them. It allows for future expansion if/when other platforms add support for the enhanced keepalive directives and someone adds a perl module for it ( OSX has some but not all last I checked). I.e., it doesn't in any way make Net::LDAP platform specific, but it allows enhanced functionality if it is supported on the platform in a way that application authors can trivially add it to their existing code, keeping it clearly organized in their Net::LDAP instantiation blocks. --Quanah -- Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration