← All docs
stream_socket_accept()
Accept a connection on a socket created by stream_socket_server().
stream_socket_accept()
function stream_socket_accept(resource $socket, float $timeout = null, string $peer_name = null): mixed
Accept a connection on a socket created by stream_socket_server().
Parameters:
$socket(resource)$timeout(float), defaultnull, optional$peer_name(string), passed by reference, defaultnull, optional
Returns: mixed
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/filesystem/stream_socket_accept.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how stream_socket_accept is implemented in the compiler, see the internals page.