Group
Extension

Matches 2

JSON-RPC2-TwoWay ( W/WI/WIEGEROP/JSON-RPC2-TwoWay-0.08.tar.gz, WIEGEROP, 2023; MetaCPAN )
JSON-RPC2-TwoWay/lib/JSON/RPC2/TwoWay.pm ( view source; MetaCPAN )
package JSON::RPC2::TwoWay;
use 5.10.0;
use strict;
use warnings;

our $VERSION = '0.08'; # VERSION

# standard perl
use Carp;
use Data::Dumper;

# cpan
use JSON::MaybeXS qw();

# us
use JSON::RPC2::T
y STDERR @_ },
		json => $opt{json} // JSON::MaybeXS->new(utf8 => 1),
		methods => {},
	};
	return bless $self, $class;
}

sub newconnection {
	my ($self, %opt) = @_;
	my $conn = JSON::RPC2::TwoWay::C
r => $opt{owner},
		write => $opt{write},
		debug => $self->{debug} ? $self->{log} : 0,
		json => $self->{json},
	);
	return $conn
}

sub register {
	my ($self, $name, $cb, %opts) = @_;
	my %defaults 
JSON-RPC2-TwoWay ( W/WI/WIEGEROP/JSON-RPC2-TwoWay-0.08.tar.gz, WIEGEROP, 2023; MetaCPAN )
JSON-RPC2-TwoWay/lib/JSON/RPC2/TwoWay/Connection.pm ( view source; MetaCPAN )
package JSON::RPC2::TwoWay::Connection;

use 5.10.0;
use strict;
use warnings;

our $VERSION = '0.08'; # VERSION

# standard perl
use Carp;
use Data::Dumper;
use Digest::MD5 qw(md5_base64);
use Scalar
HiRes::time;

# cpan
use JSON::MaybeXS qw();

use constant ERR_REQ    => -32600;

sub new {
	my ($class, %opt) = @_;
	croak 'no rpc?' unless $opt{rpc} and $opt{rpc}->isa('JSON::RPC2::TwoWay');
	#croak
@_ },
		next_id => 1,
		owner => $opt{owner},
		request => undef,
		rpc => $opt{rpc},
		json => $opt{rpc}->{json},
		state => undef,
		write => $opt{write},
	};
	weaken $self->{owner};
	return bless $

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.