pssht  latest
SSH server library written in PHP
CLOSE.php
1 <?php
2 
3 /*
4 * This file is part of pssht.
5 *
6 * (c) François Poirotte <clicky@erebot.net>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11 
13 
17 class CLOSE extends Base
18 {
19  // SSH_MSG_CHANNEL_CLOSE = 97
20  public function handle(
21  $msgType,
22  \fpoirotte\Pssht\Wire\Decoder $decoder,
23  \fpoirotte\Pssht\Transport $transport,
24  array &$context
25  ) {
27  $channel = $message->getChannel();
28  $response = new \fpoirotte\Pssht\Messages\CHANNEL\CLOSE(
29  $this->connection->getChannel($channel)
30  );
31  $transport->writeMessage($response);
32  $this->connection->freeChannel($channel);
33  return true;
34  }
35 }
handle($msgType,\fpoirotte\Pssht\Wire\Decoder $decoder,\fpoirotte\Pssht\Transport $transport, array &$context)
Definition: CLOSE.php:20
static unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)
Definition: Base.php:39