--- trunk/Estraier.pm 2006/01/05 15:30:35 29 +++ trunk/Estraier.pm 2006/01/05 15:38:34 32 @@ -718,6 +718,51 @@ $self->{pxport} = $port; } +=head2 set_timeout + +Specify timeout of connection in seconds + + $node->set_timeout( 15 ); + +=cut + +sub set_timeout { + my $self = shift; + my $sec = shift; + croak "timeout must be number" unless ($sec =~ m/^\d+$/); + $self->{timeout} = $sec; +} + +=head2 set_auth + +Specify name and password for authentication to node server. + + $node->set_auth('clint','eastwood'); + +=cut + +sub set_auth { + my $self = shift; + my ($login,$passwd) = @_; + $self->{auth} = "$login:$passwd"; +} + +=head2 status + +Return status code of last request. + + print $res->status; + +C<-1> means connection failure. + +=cut + +sub status { + my $self = shift; + return $self->{status}; +} + + package Search::Estraier::Master; use Carp;