POE::Component::Server::JSONRPCPOE tcp or http based JSON-RPC server | |
Download |
POE::Component::Server::JSONRPC Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Come BERNIGAUD
- Publisher web site:
- http://search.cpan.org/~mcmic/
POE::Component::Server::JSONRPC Tags
POE::Component::Server::JSONRPC Description
POE::Component::Server::JSONRPC is a Perl module, a POE component for TCP or HTTP based JSON-RPC Server.The specification is defined on http://json-rpc.org/ and this module use JSON-RPC 1.0 spec (1.1 does not cover tcp streams).SYNOPSIS #http version: POE::Component::Server::JSONRPC::Http->new( Port => 3000, Handler => { 'echo' => 'echo', 'sum' => 'sum', }, SslKey => '/path/to/the/server.key', SslCert => '/path/to/the/server.crt', Authenticate => \&authentication_handler, # authentication_handler must be a function that takes two parameters login and password, # and returns true if connection is successful, false otherwise ); #tcp version: POE::Component::Server::JSONRPC::Tcp->new( Port => 3000, Handler => { 'echo' => 'echo', 'sum' => 'sum', }, ); sub echo { my ($kernel, $jsonrpc, $id, @params) = @_; $kernel->post( $jsonrpc => 'result' => $id, @params ); } sub sum { my ($kernel, $jsonrpc, $id, @params) = @_; $kernel->post( $jsonrpc => 'result' => $id, $params + $params ); }Product's homepage
POE::Component::Server::JSONRPC Related Software