← All docs

stream_socket_recvfrom()

Receives data from a socket, connected or not.

stream_socket_recvfrom()

function stream_socket_recvfrom(resource $socket, int $length, int $flags = 0, string $address = ''): mixed

Receives data from a socket, connected or not.

Parameters:

  • $socket (resource)
  • $length (int)
  • $flags (int), default 0, optional
  • $address (string), passed by reference, default '', optional

Returns: mixed

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how stream_socket_recvfrom is implemented in the compiler, see the internals page.