ARCv2
view release on metacpan or search on metacpan
lib/Arc/Connection/Server.pod view on Meta::CPAN
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)
B<Example:>
if (my $line = $this->_RecvLine()) { ... }
=item _Sasl ( $saslstr ) I<inherited from Arc::Connection>
B<Description>: send the ARCv2 SASL command. (protocol)
This function encodes the output from sasl_*_start and sasl_*_step with Base-64 and sends
it to the other side
B<Returns:> true if successful, otherwise false
B<Example:>
$this->_Sasl($sasl->client_start());
=item _SendCommand ( $cmd, $parameter ) I<inherited from Arc::Connection>
B<Description>: send a command. (protocol)
Send a command to the ARCv2 socket.
B<Returns:> true if successful, otherwise false
B<Example:>
$this->_SendCommand("CMDPASV",$consock->sockhost.':'.$consock->sockport);
=item _SendLine ( ... (line) ) I<inherited from Arc::Connection>
B<Description>: send a line. (protocol)
This function sends a command line to the ARCv2 socket.
B<Returns:> true if writing has succeeded, otherwise false.
B<Example:>
$this->_SendLine($cmd,"test");
=back
=over 2
( run in 1.399 second using v1.01-cache-2.11-cpan-c966e8aa7e8 )