Net::RRP::Protocol - rrp protocol


Net-RRP documentation  | view source Contained in the Net-RRP distribution.

Index


NAME

Top

Net::RRP::Protocol - rrp protocol

SYNOPSIS

Top

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

DESCRIPTION

Top

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.

 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.

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

Top

SEE ALSO

Top

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.