1 | <?php |
||
13 | class PingFrame extends \Hyphper\Frame |
||
14 | { |
||
15 | protected $defined_flags = [Flag::ACK]; |
||
16 | protected $type = 0x06; |
||
17 | protected $stream_association = self::NO_STREAM; |
||
18 | protected $opaque_data; |
||
19 | |||
20 | /** |
||
21 | * PingFrame constructor. |
||
22 | * |
||
23 | * @param array $options |
||
24 | */ |
||
25 | 7 | public function __construct(array $options = []) |
|
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | * @throws InvalidFrameException |
||
35 | */ |
||
36 | 2 | public function serializeBody(): string |
|
49 | |||
50 | /** |
||
51 | * Given the body of a frame, parses it into frame data. This populates |
||
52 | * the non-header parts of the frame: that is, it does not populate the |
||
53 | * stream ID or flags. |
||
54 | * |
||
55 | * |
||
56 | * @param string $data |
||
57 | * |
||
58 | * @return void |
||
59 | */ |
||
60 | 3 | public function parseBody(string $data) |
|
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | 1 | public function getOpaqueData(): string |
|
79 | |||
80 | /** |
||
81 | * @param string $opaque_data |
||
82 | * @return $this |
||
83 | */ |
||
84 | 2 | public function setOpaqueData(string $opaque_data) |
|
89 | } |
||
90 |