pssht
latest
SSH server library written in PHP
|
Public Member Functions | |
__construct (\fpoirotte\Pssht\Transport $transport) | |
allocateChannel (\fpoirotte\Pssht\Messages\CHANNEL\OPEN $message) | |
freeChannel ($id) | |
getChannel ($message) | |
handle ($msgType,\fpoirotte\Pssht\Wire\Decoder $decoder,\fpoirotte\Pssht\Transport $transport, array &$context) | |
setHandler ($message, $type,\fpoirotte\Pssht\Handlers\HandlerInterface $handler) | |
unsetHandler ($message, $type,\fpoirotte\Pssht\Handlers\HandlerInterface $handler) | |
Protected Attributes | |
$channels | |
Opened SSH channels. | |
Connection layer for the SSH protocol (RFC 4254).
Definition at line 21 of file Connection.php.
fpoirotte\Pssht\Connection::__construct | ( | \fpoirotte\Pssht\Transport | $transport | ) |
Construct a new SSH connection layer.
fpoirotte::Pssht::Transport | $transport | SSH transport layer. |
Definition at line 32 of file Connection.php.
References fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base\getMessageId().
fpoirotte\Pssht\Connection::allocateChannel | ( | \fpoirotte\Pssht\Messages\CHANNEL\OPEN | $message | ) |
Allocate a new communication channel.
fpoirotte::Pssht::Messages::CHANNEL::OPEN | $message | Original message requesting channel allocation. |
Definition at line 93 of file Connection.php.
fpoirotte\Pssht\Connection::freeChannel | ( | $id | ) |
Free a channel allocation.
int | $id | Channel identifier. |
Connection | Returns this connection. |
Definition at line 112 of file Connection.php.
fpoirotte\Pssht\Connection::getChannel | ( | $message | ) |
Retrieve the channel associated with a message.
int | fpoirotte::Pssht::Messages::CHANNEL::REQUEST::Base | $message | Either a message or the message's channel identifier. |
int | Remote channel associated with the message. |
Definition at line 132 of file Connection.php.
fpoirotte\Pssht\Connection::handle | ( | $msgType, | |
\fpoirotte\Pssht\Wire\Decoder | $decoder, | ||
\fpoirotte\Pssht\Transport | $transport, | ||
array & | $context | ||
) |
Handle an SSH message.
int | $msgType | Message identifier. |
fpoirotte::Pssht::Wire::Decoder | $decoder | Decoder for the message. |
fpoirotte::Pssht::Transport | $transport | Transport layer the message was received from. |
array | $context | Context for the SSH connection. |
Implements fpoirotte\Pssht\Handlers\HandlerInterface.
Definition at line 56 of file Connection.php.
fpoirotte\Pssht\Connection::setHandler | ( | $message, | |
$type, | |||
\fpoirotte\Pssht\Handlers\HandlerInterface | $handler | ||
) |
Register a handler.
int | fpoirotte::Pssht::Messages::CHANNEL::REQUEST::Base | $message | Either a message or the message's channel identifier. |
int | $type | Message type. |
fpoirotte::Pssht::Handlers::HandlerInterface | $handler | Handler to associate with the message. |
Definition at line 152 of file Connection.php.
fpoirotte\Pssht\Connection::unsetHandler | ( | $message, | |
$type, | |||
\fpoirotte\Pssht\Handlers\HandlerInterface | $handler | ||
) |
Unregister a handler.
int | fpoirotte::Pssht::Messages::CHANNEL::REQUEST::Base | $message | Either a message or the message's channel identifier. |
int | $type | Message type. |
fpoirotte::Pssht::Handlers::HandlerInterface | $handler | Handler to unregister. |
Definition at line 184 of file Connection.php.