13 use \fpoirotte\Pssht\Messages\DISCONNECT;
25 public function __construct(
30 $logging = \Plop\Plop::getInstance();
32 if (!($message instanceof \
fpoirotte\Pssht\Messages\CHANNEL\REQUEST\Exec)) {
39 $logging->info(
"Sending number back (%s)", array($message->getCommand()));
40 $response = new \fpoirotte\Pssht\Messages\CHANNEL\DATA(
41 $message->getChannel(),
42 'Your number: ' . $message->getCommand() . PHP_EOL
44 $transport->writeMessage($response);
46 $logging->info(
"Sending EOF message");
47 $response = new \fpoirotte\Pssht\Messages\CHANNEL\EOF(
48 $message->getChannel()
50 $transport->writeMessage($response);
54 $logging->info(
"Sending exit status (%s)", array($message->getCommand()));
55 $response = new \fpoirotte\Pssht\Messages\CHANNEL\REQUEST\ExitStatus(
56 $message->getChannel(),
59 (int) $message->getCommand()
61 $transport->writeMessage($response);
65 $logging->info(
"Sending EOW message");
66 $response = new \fpoirotte\Pssht\Messages\CHANNEL\REQUEST\OpensshCom\Eow(
67 $message->getChannel(),
71 $transport->writeMessage($response);
73 $logging->info(
"Closing the channel");
74 $response = new \fpoirotte\Pssht\Messages\CHANNEL\CLOSE(
75 $message->getChannel()
77 $transport->writeMessage($response);
handle($msgType,\fpoirotte\Pssht\Wire\Decoder $decoder,\fpoirotte\Pssht\Transport $transport, array &$context)
const SSH_DISCONNECT_SERVICE_NOT_AVAILABLE
Disconnected because the requested service is not available.