pssht  latest
SSH server library written in PHP
CONFIRMATION.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 
18 {
20  protected $recipientChannel;
21 
23  protected $senderChannel;
24 
26  protected $initialWindowSize;
27 
29  protected $maximumPacketSize;
30 
31 
48  {
49  $this->recipientChannel = $recipientChannel;
50  $this->senderChannel = $senderChannel;
51  $this->initialWindowSize = $initialWindowSize;
52  $this->maximumPacketSize = $maximumPacketSize;
53  }
54 
55  public static function getMessageId()
56  {
57  return 91;
58  }
59 
60  public function serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
61  {
62  $encoder->encodeUint32($this->recipientChannel);
63  $encoder->encodeUint32($this->senderChannel);
64  $encoder->encodeUint32($this->initialWindowSize);
65  $encoder->encodeUint32($this->maximumPacketSize);
66  return $this;
67  }
68 
69  public static function unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)
70  {
71  return new static(
72  $decoder->decodeUint32(),
73  $decoder->decodeUint32(),
74  $decoder->decodeUint32(),
75  $decoder->decodeUint32()
76  );
77  }
78 }
static unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)
$initialWindowSize
Initial window size for the channel.
__construct($recipientChannel, $senderChannel, $initialWindowSize, $maximumPacketSize)
serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)