Games-Poker-OPP

 view release on metacpan or  search on metacpan

OPP.pm  view on Meta::CPAN

sub put { my ($self, $what) = @_; $self->{socket}->write($what, length $what); }
sub get { 
    my ($self, $len) = @_; 
    my $buf = " "x$len; 
    my $newlen = $self->{socket}->read($buf, $len);
    return substr($buf,0,$newlen);
}

=head2 joingame

Sends username/password credentials and joins the game. Returns 0 if
the username/password was not accepted.

=cut

sub joingame {
    my $self = shift;
    $self->send_packet(JOIN_GAME,
        $self->{username},
        $self->{password},
        1, # Protocol version



( run in 0.291 second using v1.01-cache-2.11-cpan-4d50c553e7e )