Home > PHP > Function > Streams > stream_socket_shutdown()

stream_socket_shutdown()

stream_socket_shutdown - Shutdown a full-duplex connection

Syntax

bool stream_socket_shutdown (resource $stream, int $how)

Arguments

  • stream - An open stream (opened with stream_socket_client(), for example)
  • how - One of the following constants: STREAM_SHUT_RD (disable further receptions), STREAM_SHUT_WR (disable further transmissions) or STREAM_SHUT_RDWR (disable further receptions and transmissions).

Description

Shutdowns (partially or not) a full-duplex connection.

Version

PHP 5.2.1

Return value

Returns TRUE on success or FALSE on failure.