DBGp-Client

 view release on metacpan or  search on metacpan

lib/DBGp/Client/AsyncConnection.pm  view on Meta::CPAN

    my $stream = DBGp::Client::AsyncStream->new(socket => $args{socket});

    my $self = my $weak_self = bless {
        stream          => $stream,
        sequence        => 0,
        init            => undef,
        commands        => {},
        on_stream       => undef,
        on_notification => undef,
    }, $class;
    Scalar::Util::weaken($weak_self);
    $stream->on_line(sub { $weak_self->_receive_line(@_) });

    return $self;
}

sub init { $_[0]->{init} }

sub send_command {
    my ($self, $callback, $command, @args) = @_;
    my $seq_id = ++$self->{sequence};



( run in 0.300 second using v1.01-cache-2.11-cpan-65fba6d93b7 )