package JSON::RPC2::AnyEvent::Client;
use 5.008005;
use strict;
use warnings;
use utf8;
use AnyEvent::Handle;
use AnyEvent::HTTP;
use JSON::RPC2::Client;
use Scalar::Util qw(weaken);
our $VERSION =
ce named listed destroy );
sub new {
my $class = shift;
my $self = bless {
client => JSON::RPC2::Client->new(),
call => 'call',
@_,
remappable => {},
cb => {},
{url} ) {
$self->{request_fn} = \&JSON::RPC2::AnyEvent::Client::__request_http;
} else {
$self->__connect_tcp;
$self->{request_fn} = \&JSON::RPC2::AnyEvent::Client::__request_tcp;