EventUtil::setSocketOption
(PECL event >= 1.6.0)
EventUtil::setSocketOption — Sets socket options
Description
mixed
$socket ,int
$level ,int
$optname ,mixed
$optval): bool
Sets socket options.
Parameters
socketSocket resource, stream, or numeric file descriptor associated with the socket.
levelOne of
EventUtil::SOL_*constants. Specifies the protocol level at which the option resides. For example, to retrieve options at the socket level, alevelparameter ofEventUtil::SOL_SOCKETwould 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.optnameOption name(type). Has the same meaning as corresponding parameter of socket_get_option() function. See EventUtil constants.
optvalAccepts the same values as
optvalparameter of the socket_get_option() function.
See Also
- socket_get_option() - Gets socket options for the socket
- socket_set_option() - Sets socket options for the socket