| Net-RRP documentation | view source | Contained in the Net-RRP distribution. |
Net::RRP::Protocol - rrp protocol
use Net::RRP::Protocol; my $protocol = new Net::RRP::Protocol ( %parameters_for_IO_Socket_SSL_new ); my $protocol1 = new Net::RRP::Protocol ( socket => $io_socket_ssl_object );
This class implements rrp command ( request/response ) communications over socket ( IO::Socket::SSL )
This is a comstructor. You must setup complete paraters for initiliaze of IO::Socket::SSL instance or pass already initilized socket at 'socket' key.
use Net::RRP::Protocol; my $protocol = new Net::RRP::Protocol ( %parameters_for_IO_Socket_SSL_new ); my $protocol1 = new Net::RRP::Protocol ( socket => $io_socket_ssl_object );
See IO::Socket::SSL(3) for more details about IO::Socket::SSL parameters.
Get Net::RRP::Request class instance from socket. See Net::RRP::Codec(3) for more details about parsing of stream && get Net::RRP::Request instance.
my $request = $protocol->getRequest ();
Get Net::RRP::Response class instance from socket. See Net::RRP::Codec(3) for more details about parsing of stream && get Net::RRP::Response instance.
my $response = $protocol->getResponse ();
Send rrp request to socket. Example:
$protocol->sendRequest ( $request );
throw throw Net::RRP::Exception::IOError if io errors.
Send rrp response to socket. Example:
$protocol->sendResponse ( $response );
throw throw Net::RRP::Exception::IOError if io errors.
Send a "hello" message to a socket at the server part. You can pass registryName, version and buildDate parameters to this call.
$protocol->hello ( registryName => "RU", version => '1.1.0', buildDate => 'Mon Jun 19 14:04:00 MSK 2000' ).
Return true if ok and false at errors.
Get "hello" from scream
$protocol->getHello();
Net::RRP::Protocol (C) Michael Kulakov, Zenon N.S.P. 2000
125124, 19, 1-st Jamskogo polja st,
Moscow, Russian Federation
mkul@cpan.org
All rights reserved.
You may distribute this package under the terms of either the GNU
General Public License or the Artistic License, as specified in the
Perl README file.
Net::RRP::Request(3), Net::RRP::Response(3), Net::RRP::Codec(3), RFC 2832
| Net-RRP documentation | view source | Contained in the Net-RRP distribution. |