← All docs

stream_socket_pair()

Creates a pair of connected, indistinguishable socket streams.

stream_socket_pair()

function stream_socket_pair(int $domain, int $type, int $protocol): mixed

Creates a pair of connected, indistinguishable socket streams.

Parameters:

  • $domain (int)
  • $type (int)
  • $protocol (int)

Returns: mixed

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

Internals

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