ARCv2
view release on metacpan or search on metacpan
lib/Arc/Connection/Server.pod view on Meta::CPAN
B<Returns:> true when succesful, otherwise false
B<Example:>
$this->_StartAuthentication();
=item _StepAuthentication ( bool $first_step )
B<Description>: Another SASL step
Response of a SASL command from the client
Protocol command: SASL <base64 encoded SASL outout>\r\n
B<Returns:> true when succesful, otherwise false
B<Example:>
$this->_StepAuthentication(1);
=back
=over 2
=item _CommandConnection ( ) I<inherited from Arc::Connection>
B<Description>: initializes command connection. (protocol)
Starts listen on the Command socket and sends the B<CMDPASV> command.
B<Returns:> true if everything went like expected, otherwise false.
B<Example:>
$this->_CommandConnection();
=item _PrepareAuthentication ( ) I<inherited from Arc::Connection>
B<Description>: initialize sasl.
This function initializes the C<__sasl> member with an object
of C<Authen::SASL>.
B<Returns:> true if successful, otherwise false
B<Example:>
$this->_PrepareAuthentication() || return;
=item _ProcessLine ( $cmd ) I<inherited from Arc::Connection>
B<Description>: process an ARCv2 command. (protocol)
Process a command by evaling $this->_R$cmd. Also checks if
this command was expected now (looks into the $this->{_expectedcmds} array).
Used by client and server.
B<Returns:> true, if ARCv2 command has been in place, otherwise false
B<Example:>
while (my $cmd = $this->_RecvCommand() && $this->_ProcessLine($cmd)) {}
=item _ReadWriteBinary ( *locfdin, *locfdout ) I<inherited from Arc::Connection>
B<Description>: function for reading and writing on the command connection.
This function is always used by the C<Arc::Connection::Server> to handle
command data. When calling the C<ProcessCommand> from C<Arc::Connection::Client>
this function is also used.
Data is read from the local socket resp. pipe and is written encrypted
to the network socket. The other side reads the data from network socket,
decrypts it and writes it to its local socket. This function behaves differently on
client and server sides, when the local or network socket is closed.
B<Returns:> always true
B<Example:>
$this->ReadWriteBinary(*STDIN,*STDOUT);
=item _RecvCommand ( ) I<inherited from Arc::Connection>
B<Description>: receives an ARCv2 Command. (protocol)
This function gets a line from C<_RecvLine> and extracts the ARCv2 command and
the optional command parameter C<_cmdparameter>.
B<Returns:> ARCv2 command and true if everything works fine, otherwise false
B<Example:>
while (my $cmd = $this->_RecvCommand()) { ... }
=item _RecvLine ( ) I<inherited from Arc::Connection>
B<Description>: receive a line (command). (protocol)
This function receives data from the ARCv2 connection and
fills the internal C<__linequeue> and C<__partial>. It returns
a line from the internal buffer if there is any. It also handles
timeouts and "connection closed by foreign host"'s.
B<Returns:> true (and the line) if everything worked fine, otherwise false (undef)
( run in 0.500 second using v1.01-cache-2.11-cpan-39bf76dae61 )