GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ANYEVENT::MPRPC (3)

.ds Aq ’

NAME

AnyEvent::MPRPC - Simple TCP-based MPRPC client/server

CONTENTS

SYNOPSIS



    use AnyEvent::MPRPC;

    my $server = mprpc_server 127.0.0.1, 4423;
    $server->reg_cb(
        echo => sub {
            my ($res_cv, @params) = @_;
            $res_cv->result(@params);
        },
    );

    my $client = mprpc_client 127.0.0.1, 4423;
    my $d = $client->call( echo => foo bar );

    my $res = $d->recv; # => foo bar;



DESCRIPTION

This module provide TCP-based MessagePack RPC server/client implementation.

AnyEvent::MPRPC provide you a couple of export functions that are shortcut of AnyEvent::MPRPC::Client and AnyEvent::MPRPC::Server. One is mprpc_client for Client, another is mprpc_server for Server.

FUNCTIONS

mprpc_server CW$address, CW$port;

Create AnyEvent::MPRPC::Server object and return it.

This is equivalent to:



    AnyEvent::MPRPC::Server->new(
        address => $address,
        port    => $port,
    );



See AnyEvent::MPRPC::Server for more detail.

mprpc_client CW$hostname, CW$port

Create AnyEvent::MPRPC::Client object and return it.

This is equivalent to:



    AnyEvent::MPRPC::Client->new(
        host => $hostname,
        port => $port,
    );



See AnyEvent::MPRPC::Client for more detail.

SEE ALSO

AnyEvent::MPRPC::Client, AnyEvent::MPRPC::Server. AnyEvent::JSONRPC::Lite

<http://msgpack.org/>

<http://wiki.msgpack.org/display/MSGPACK/RPC+specification>

AUTHOR

Tokuhiro Matsuno <tokuhirom@cpan.org>

THANKS TO

typester++ wrote AnyEvent::JSONRPC::Lite. This module takes A LOT OF CODE from that module =P

COPYRIGHT AND LICENSE

Copyright (c) 2009 by tokuhirom.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 ANYEVENT::MPRPC (3) 2013-02-01

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.