Menu Home

stream_socket_shutdown

osbo.com | PHP | Functions | stream_socket_shutdown

Shutdown a full-duplex connection

Syntax

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

Parameters

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
STREAM_SHUT_RDWR disable further receptions and transmissions

Return

Returns TRUE on success or FALSE on failure.

Examples

stream how

int(5)
bool(false)

Return

true

PHP