pssht  latest
SSH server library written in PHP
ExitStatus.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 
19 {
21  protected $status;
22 
23 
34  {
35  parent::__construct($channel, $type, $wantReply);
36  $this->status = $status;
37  }
38 
39  public function serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
40  {
41  parent::serialize($encoder);
42  $encoder->encodeUint32($this->status);
43  return $this;
44  }
45 
46  protected static function unserializeSub(\fpoirotte\Pssht\Wire\Decoder $decoder)
47  {
48  return array($decoder->decodeUint32());
49  }
50 
57  public function getStatus()
58  {
59  return $this->status;
60  }
61 }
$channel
Local channel identifier.
Definition: Base.php:20
serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
Definition: ExitStatus.php:39
$wantReply
Whether the sender of the message wants a reply or not.
Definition: Base.php:23
__construct($channel, $type, $wantReply, $status)
Definition: ExitStatus.php:33