← All built-ins / stream_socket_accept()

stream_socket_accept()

stream_socket_accept(...$args): mixed

Parameters

NameTypeDescription
$serverresourcehandle from stream_socket_server()

Return value

Connection handle for one accepted client (blocks until a client connects).

Example

echo "see registry/server.hphp for the full accept loop";
see registry/server.hphp for the full accept loop

This call needs a real environment (window, server, database or stdin) — the snippet above shows the typical usage shape.

See also

stream_socket_server()stream_socket_accept2()