| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function recv (int $length, int $flags = 0, string &$name = '', int &$port = 0): string { |
||
| 32 | $count = @socket_recvfrom($this->resource, $data, $length, $flags, $name, $port); |
||
| 33 | if ($count === false) { |
||
| 34 | throw new SocketError($this->resource, SOCKET_EOPNOTSUPP); |
||
| 35 | } |
||
| 36 | return (string)$data; // cast needed, will be null if 0 bytes are read |
||
| 37 | } |
||
| 38 | |||
| 39 | } |