stream_socket_accept

Supported Versions: PHP 5, PHP 7, PHP 8
Accept a connection on a socket created by stream_socket_server()
<?php stream_socket_accept(resource $socket, ?float $timeout = null, string &$peer_name = null): resource|false
<?php             foreach ($read as $stream) {

                if ($this->socket === $stream) {

                    $stream = stream_socket_accept($this->socket);

                    $sockets[(int) $stream] = $stream;

                } elseif (feof($stream)) {

                    unset($sockets[(int) $stream]);