| 1 | <?php |
||
| 8 | class DatagramServer extends AbstractServer { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * `SOCK_DGRAM` |
||
| 12 | * |
||
| 13 | * @return int |
||
| 14 | */ |
||
| 15 | final public static function getType (): int { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Receives data from a peer. |
||
| 21 | * |
||
| 22 | * @see https://php.net/socket_recvfrom |
||
| 23 | * |
||
| 24 | * @param int $length Maximum length to read. |
||
| 25 | * @param int $flags `MSG_*` |
||
| 26 | * @param string $name Assigned the peer's address, or Unix socket file path. |
||
| 27 | * @param int $port Assigned the peer's port, or `0` for Unix sockets. |
||
| 28 | * @return string |
||
| 29 | * @throws SocketError |
||
| 30 | */ |
||
| 31 | public function recv (int $length, int $flags = 0, string &$name = '', int &$port = 0): string { |
||
| 38 | |||
| 39 | } |