ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/DNS.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/DNS.pm (file contents):
Revision 1.52 by root, Fri May 30 08:17:10 2008 UTC vs.
Revision 1.53 by root, Fri May 30 09:40:41 2008 UTC

881 $self->parse_resolv_conf (<$fh>); 881 $self->parse_resolv_conf (<$fh>);
882 } 882 }
883 } 883 }
884} 884}
885 885
886=item $resolver->timeout ($timeout, ...)
887
888Sets the timeout values. See the C<timeout> constructor argument (and note
889that this method uses the values itselt, not an array-reference).
890
891=cut
892
893sub timeout {
894 my ($self, @timeout) = @_;
895
896 $self->{timeout} = \@timeout;
897 $self->_compile;
898}
899
900=item $resolver->max_outstanding ($nrequests)
901
902Sets the maximum number of outstanding requests to C<$nrequests>. See the
903C<max_outstanding> constructor argument.
904
905=cut
906
907sub max_outstanding {
908 my ($self, $max) = @_;
909
910 $self->{max_outstanding} = $max;
911 $self->_scheduler;
912}
913
886sub _compile { 914sub _compile {
887 my $self = shift; 915 my $self = shift;
888 916
889 my %search; $self->{search} = [grep 0 < length, grep !$search{$_}++, @{ $self->{search} }]; 917 my %search; $self->{search} = [grep 0 < length, grep !$search{$_}++, @{ $self->{search} }];
890 my %server; $self->{server} = [grep 0 < length, grep !$server{$_}++, @{ $self->{server} }]; 918 my %server; $self->{server} = [grep 0 < length, grep !$server{$_}++, @{ $self->{server} }];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines