@@ -167,6 +167,9 @@ discard block |
||
167 | 167 | return $this->options['fragment_size']; |
168 | 168 | } |
169 | 169 | |
170 | + /** |
|
171 | + * @param string $payload |
|
172 | + */ |
|
170 | 173 | public function send($payload, $opcode = 'text', $masked = true) |
171 | 174 | { |
172 | 175 | if (!$this->is_connected) { |
@@ -199,6 +202,12 @@ discard block |
||
199 | 202 | } |
200 | 203 | } |
201 | 204 | |
205 | + /** |
|
206 | + * @param boolean $final |
|
207 | + * @param string $payload |
|
208 | + * @param string $opcode |
|
209 | + * @param boolean $masked |
|
210 | + */ |
|
202 | 211 | protected function send_fragment($final, $payload, $opcode, $masked) |
203 | 212 | { |
204 | 213 | // Binary string for header. |
@@ -375,6 +384,9 @@ discard block |
||
375 | 384 | return $this->receive(); // Receiving a close frame will close the socket now. |
376 | 385 | } |
377 | 386 | |
387 | + /** |
|
388 | + * @param string $data |
|
389 | + */ |
|
378 | 390 | protected function write($data) |
379 | 391 | { |
380 | 392 | $written = fwrite($this->socket, $data); |
@@ -412,6 +424,7 @@ discard block |
||
412 | 424 | |
413 | 425 | /** |
414 | 426 | * Helper to convert a binary to a string of '0' and '1'. |
427 | + * @param string $string |
|
415 | 428 | */ |
416 | 429 | protected static function sprintB($string) |
417 | 430 | { |