From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

NAME

Net::RRP::Protocol - rrp protocol

SYNOPSIS

my $protocol = new Net::RRP::Protocol ( %parameters_for_IO_Socket_SSL_new );
my $protocol1 = new Net::RRP::Protocol ( socket => $io_socket_ssl_object );

DESCRIPTION

This class implements rrp command ( request/response ) communications over socket ( IO::Socket::SSL )

new

This is a comstructor. You must setup complete paraters for initiliaze of IO::Socket::SSL instance or pass already initilized socket at 'socket' key.

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.

getRequest

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 ();

getResponse

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 ();

sendRequest

Send rrp request to socket. Example:

$protocol->sendRequest ( $request );

throw throw Net::RRP::Exception::IOError if io errors.

sendResponse

Send rrp response to socket. Example:

$protocol->sendResponse ( $response );

throw throw Net::RRP::Exception::IOError if io errors.

sendHello()

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.

getHello

Get "hello" from scream

$protocol->getHello();

AUTHOR AND COPYRIGHT

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.

SEE ALSO

Net::RRP::Request(3), Net::RRP::Response(3), Net::RRP::Codec(3), RFC 2832