EventUtil::setSocketOption
(PECL event >= 1.6.0)
EventUtil::setSocketOption — Sets socket options
Description
$socket
,
int
$level
,
int
$optname
,
mixed
$optval
)Sets socket options.
Parameters
-
socket
-
Socket resource, stream, or numeric file descriptor associated with the socket.
-
level
-
One of EventUtil::SOL_* constants. Specifies the protocol level at which the option resides. For example, to retrieve options at the socket level, a
level
parameter ofEventUtil::SOL_SOCKET
would be used. Other levels, such as TCP, can be used by specifying the protocol number of that level. Protocol numbers can be found by using the getprotobyname() function. See EventUtil constants . -
optname
-
Option name(type). Has the same meaning as corresponding parameter of socket_get_option() function. See EventUtil constants .
-
optval
-
Accepts the same values as
optval
parameter of the socket_get_option() function.
Return Values
Returns TRUE
on success. Otherwise FALSE
.
See Also
- socket_get_option() - Gets socket options for the socket
- socket_set_option() - Sets socket options for the socket
- Функция EventUtil::__construct() - The abstract constructor
- Функция EventUtil::getLastSocketErrno() - Returns the most recent socket error number
- Функция EventUtil::getLastSocketError() - Returns the most recent socket error
- Функция EventUtil::getSocketFd() - Returns numeric file descriptor of a socket, or stream
- EventUtil::getSocketName
- Функция EventUtil::setSocketOption() - Sets socket options
- Функция EventUtil::sslRandPoll() - Generates entropy by means of OpenSSL's RAND_poll()
Коментарии
404 Not Found