Memcached Handle
Other packages in the module: MemcachedTest
Package variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Synopsis
No synopsis!
Description
No description!
Methods
DESTROY
No description
Code
new
No description
Code
new_sock
No description
Code
new_udp_sock
No description
Code
sock
No description
Code
udpport
No description
Code
Methods description
None available.
Methods code
DESTROYdescriptionprevnextTop
sub DESTROY {
    my $self = shift;
    kill 9, $self->{pid};
}
newdescriptionprevnextTop
sub new {
    my ($class, %params) = @_;
    return bless\% params, $class;
}
new_sockdescriptionprevnextTop
sub new_sock {
    my $self = shift;
    if ($self->{domainsocket}) {
	return IO::Socket::UNIX->new(Peer => $self->{domainsocket});
    } else {
	return IO::Socket::INET->new(PeerAddr => "127.0.0.1:$self->{port}");
    }
}
new_udp_sockdescriptionprevnextTop
sub new_udp_sock {
    my $self = shift;
    return IO::Socket::INET->new(PeerAddr => '127.0.0.1',
                                 PeerPort => $self->{udpport},
                                 Proto    => 'udp',
                                 LocalAddr => '127.0.0.1',
                                 LocalPort => MemcachedTest::free_port('udp'),
                                 );

}

1;
}
sockdescriptionprevnextTop
sub sock {
    my $self = shift;

    if ($self->{conn} && ($self->{domainsocket} || getpeername($self->{conn}))) {
	return $self->{conn};
    }
    return $self->new_sock;
}
udpportdescriptionprevnextTop
sub udpport {
 $_[0]{udpport}
}
General documentation
No general documentation available.