stream_socket_shutdown

PHP 5 >= 5.2.1, PHP 7, PHP 8
stream_socket_shutdown - Shutdown a full-duplex connection
Manual
Code Examples

stream_socket_shutdown( resource$stream, int$mode ): bool

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

Note:

The associated buffer, or buffers, may or may not be emptied.

Parameters

stream

An open stream (opened with stream_socket_client, for example)

mode

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).

Return Values

Returns true on success or false on failure.

Related Functions

Example of stream_socket_shutdown

Show all examples for stream_socket_shutdown

PHP Version:


Function stream_socket_shutdown:

Streams Functions

Most used PHP functions