pssht  latest
SSH server library written in PHP
UNIMPLEMENTED.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 
12 namespace fpoirotte\Pssht\Messages;
13 
18 {
20  protected $sequenceNo;
21 
29  public function __construct($sequenceNo)
30  {
31  if (!is_int($sequenceNo)) {
32  throw new \InvalidArgumentException();
33  }
34 
35  $this->sequenceNo = $sequenceNo;
36  }
37 
38  public static function getMessageId()
39  {
40  return 3;
41  }
42 
43  public function serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
44  {
45  $encoder->encodeUint32($this->sequenceNo);
46  return $this;
47  }
48 
49  public static function unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)
50  {
51  return new static($decoder->decodeUint32());
52  }
53 
60  public function getSequenceNo()
61  {
62  return $this->sequenceNo;
63  }
64 }
$sequenceNo
Sequence number for the unimplemented message.
static unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)
serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)