socket_shutdown
PHP function
Edit on GitHub ✎
(PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)
Shuts down a socket for receiving, sending, or both
Description
socket_shutdown(Socket $socket, int $mode = 2): bool
The socket_shutdown() function allows you to stop incoming, outgoing or all data (the default) from being sent through the socket
Note
The associated buffer, or buffers, may or may not be emptied.
Parameters
socketA
Socketinstance created withsocket_create().modeThe value of
modecan be one of the following:0Shutdown socket reading 1Shutdown socket writing 2Shutdown socket reading and writing
Return Values
Success
Changelog
| Version | Description |
|---|