package JSONRPC::Transport::TCP;
use strict;
use warnings;
use base qw/Class::Accessor::Fast/;
__PACKAGE__->mk_accessors(qw/result error/);
use IO::Select;
use IO::Socket::INET;
use IO::Socket::UNIX
ire JSON::XS };
if ($@) {
$XS_AVAILABLE = 0;
require JSON;
}
}
=for stopwords Hostname Str tcp ip unix
=head1 NAME
JSONRPC::Transport::TCP - Client component for TCP JSONRPC
=head1 SYNOPSIS
use JSONRPC::Transport::TCP;
my $rpc = JSONRPC::Transport::TCP->new( host => '127.0.0.1', port => 3000 );
my $res = $rpc->call('echo', 'arg1', 'arg2' )
or d