socket_shutdown

(PHP 4 >= 4.1.0, PHP 5, PHP 7)

socket_shutdownShuts down a socket for receiving, sending, or both

说明

socket_shutdown ( resource $socket [, int $how = 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.

参数

socket

A valid socket resource created with socket_create().

how

The value of how can be one of the following:

possible values for how
0 Shutdown socket reading
1 Shutdown socket writing
2 Shutdown socket reading and writing

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE

相关文章
php cubrid mysql 兼容性函数 fetch a result row as an associative array a numeric array or bothphp frontbase 函数 fetch a result row as an associative array a numeric array or bothphp maxdb 函数 fetch a result row as an associative a numeric array or bothphp maxdb 函数 pings a server connection or tries to reconnect if the connection has gone downphp maxdb 函数 shut down the embedded serverphp postgresql 函数 get a read only handle to the socket underlying a postgresql connectionphp socket 函数 accepts a connection on a socketphp socket 函数 create and bind to a socket from a given addrinfophp socket 函数 create and connect to a socket from a given addrinfophp socket 函数 别名 socket get optionphp socket 函数 queries the remote side of the given socket which may either result in host/port or in a unix filesystem path dependent on its typephp socket 函数 queries the local side of the given socket which may either result in host/port or in a unix filesystem path dependent on its typephp socket 函数 sets nonblocking mode for file descriptor fdphp socket 函数 sets socket options for the socketphp socket 函数 shuts down a socket for receiving sending or bothphp stream 函数 receives data from a socket connected or notphp stream 函数 sends a message to a socket whether it is connected or notphp stream 函数 create an internet or unix domain server socketphp swoole 函数 remove all event callback functions of a socketphp swoole 函数 update the event callback functions of a socket
关注编程学问公众号