* Get array with contents of getaddrinfo about the given hostname. * @link https://www.php.net/manual/en/function.socket-addrinfo-lookup.php * @param string $host

* Hostname to search. *

* @param string $service [optional]

* The service to connect to. If service is a name, it is translated to the corresponding port number. *

* @param array $hints

* Hints provide criteria for selecting addresses returned. You may specify the hints as defined by getadrinfo. *

* @return AddressInfo[]|false of AddrInfo resource handles that can be used with the other socket_addrinfo functions. * @since 7.2 */ function socket_addrinfo_lookup(string $host, ?string $service, array $hints = []): array|false { } /** * Create a Socket resource, and connect it to the provided AddrInfo resource.
* The return value of this function may be used with the rest of the socket functions. * @link https://www.php.net/manual/en/function.socket-addrinfo-connect.php * @param resource|AddressInfo $address

* Resource created from {@see socket_addrinfo_lookup()} *

* @return resource|Socket|null|false Socket resource on success or NULL on failure. * @since 7.2 */ function socket_addrinfo_connect(AddressInfo $address): Socket|false { } /** * (PHP 7 >= 7.2.0)
* Create a Socket resource, and bind it to the provided AddrInfo resource.
* The return value of this function may be used with {@see socket_listen()}. * @link https://www.php.net/manual/en/function.socket-addrinfo-bind.php * @param resource|AddressInfo $address

* Resource created from {@see socket_addrinfo_lookup()} *

* @return resource|Socket|null|false Socket resource on success or NULL on failure. * @since 7.2 */ function socket_addrinfo_bind(AddressInfo $address): Socket|false { } /** * (PHP 7 >= 7.2.0)
* Get information about addrinfo * @link https://www.php.net/manual/en/function.socket-addrinfo-explain.php * @param resource|AddressInfo $address

* Resource created from {@see socket_addrinfo_lookup()} *

* @return array containing the fields in the addrinfo structure. * @since 7.2 */ #[ArrayShape([ 'ai_flags' => 'int', 'ai_family' => 'int', 'ai_socktype' => 'int', 'ai_protocol' => 'int', 'ai_canonname' => 'string', 'ai_addr' => [ 'sin_port' => 'int', 'sin_addr' => 'string', 'sin6_port' => 'int', 'sin6_addr' => 'string', ] ])] function socket_addrinfo_explain(AddressInfo $address): array { } /** * Runs the select() system call on the given arrays of sockets with a specified timeout * @link https://php.net/manual/en/function.socket-select.php * @param array|null &$read

* The sockets listed in the read array will be * watched to see if characters become available for reading (more * precisely, to see if a read will not block - in particular, a socket * resource is also ready on end-of-file, in which case a * socket_read will return a zero length string). *

* @param array|null &$write

* The sockets listed in the write array will be * watched to see if a write will not block. *

* @param array|null &$except

* The sockets listed in the except array will be * watched for exceptions. *

* @param int|null $seconds

* The tv_sec and tv_usec * together form the timeout parameter. The * timeout is an upper bound on the amount of time * elapsed before socket_select return. * tv_sec may be zero , causing * socket_select to return immediately. This is useful * for polling. If tv_sec is NULL (no timeout), * socket_select can block indefinitely. *

* @param int $microseconds [optional] * @return int|false On success socket_select returns the number of * socket resources contained in the modified arrays, which may be zero if * the timeout expires before anything interesting happens. On error FALSE * is returned. The error code can be retrieved with * socket_last_error. *

*

* Be sure to use the === operator when checking for an * error. Since the socket_select may return 0 the * comparison with == would evaluate to TRUE: * Understanding socket_select's result * * $e = NULL; * if (false === socket_select($r, $w, $e, 0)) { * echo "socket_select() failed, reason: " . * socket_strerror(socket_last_error()) . "\n"; * } * */ function socket_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, int $microseconds = 0): int|false { } /** * Create a socket (endpoint for communication) * @link https://php.net/manual/en/function.socket-create.php * @param int $domain

* The domain parameter specifies the protocol * family to be used by the socket. *

* * Available address/protocol families * * * * * * * * * * * * * * * * *
DomainDescription
AF_INET * IPv4 Internet based protocols. TCP and UDP are common protocols of * this protocol family. *
AF_INET6 * IPv6 Internet based protocols. TCP and UDP are common protocols of * this protocol family. *
AF_UNIX * Local communication protocol family. High efficiency and low * overhead make it a great form of IPC (Interprocess Communication). *
* @param int $type

* The type parameter selects the type of communication * to be used by the socket. *

* * Available socket types * * * * * * * * * * * * * * * * * * * * * * * * *
TypeDescription
SOCK_STREAM * Provides sequenced, reliable, full-duplex, connection-based byte streams. * An out-of-band data transmission mechanism may be supported. * The TCP protocol is based on this socket type. *
SOCK_DGRAM * Supports datagrams (connectionless, unreliable messages of a fixed maximum length). * The UDP protocol is based on this socket type. *
SOCK_SEQPACKET * Provides a sequenced, reliable, two-way connection-based data transmission path for * datagrams of fixed maximum length; a consumer is required to read an * entire packet with each read call. *
SOCK_RAW * Provides raw network protocol access. This special type of socket * can be used to manually construct any type of protocol. A common use * for this socket type is to perform ICMP requests (like ping). *
SOCK_RDM * Provides a reliable datagram layer that does not guarantee ordering. * This is most likely not implemented on your operating system. *
* @param int $protocol

* The protocol parameter sets the specific * protocol within the specified domain to be used * when communicating on the returned socket. The proper value can be * retrieved by name by using getprotobyname. If * the desired protocol is TCP, or UDP the corresponding constants * SOL_TCP, and SOL_UDP * can also be used. *

* * Common protocols * * * * * * * * * * * * * * * * *
NameDescription
icmp * The Internet Control Message Protocol is used primarily by gateways * and hosts to report errors in datagram communication. The "ping" * command (present in most modern operating systems) is an example * application of ICMP. *
udp * The User Datagram Protocol is a connectionless, unreliable, * protocol with fixed record lengths. Due to these aspects, UDP * requires a minimum amount of protocol overhead. *
tcp * The Transmission Control Protocol is a reliable, connection based, * stream oriented, full duplex protocol. TCP guarantees that all data packets * will be received in the order in which they were sent. If any packet is somehow * lost during communication, TCP will automatically retransmit the packet until * the destination host acknowledges that packet. For reliability and performance * reasons, the TCP implementation itself decides the appropriate octet boundaries * of the underlying datagram communication layer. Therefore, TCP applications must * allow for the possibility of partial record transmission. *
* @return resource|Socket|false socket_create returns a socket resource on success, * or FALSE on error. The actual error code can be retrieved by calling * socket_last_error. This error code may be passed to * socket_strerror to get a textual explanation of the * error. */ function socket_create(int $domain, int $type, int $protocol): Socket|false { } /** * @param resource|Socket $socket * @return resource|Socket|false */ function socket_export_stream(Socket $socket) { } /** * Opens a socket on port to accept connections * @link https://php.net/manual/en/function.socket-create-listen.php * @param int $port

* The port on which to listen on all interfaces. *

* @param int $backlog [optional]

* The backlog parameter defines the maximum length * the queue of pending connections may grow to. * SOMAXCONN may be passed as * backlog parameter, see * socket_listen for more information. *

* @return resource|Socket|false socket_create_listen returns a new socket resource * on success or FALSE on error. The error code can be retrieved with * socket_last_error. This code may be passed to * socket_strerror to get a textual explanation of the * error. */ function socket_create_listen(int $port, int $backlog = 128): Socket|false { } /** * Creates a pair of indistinguishable sockets and stores them in an array * @link https://php.net/manual/en/function.socket-create-pair.php * @param int $domain

* The domain parameter specifies the protocol * family to be used by the socket. See socket_create * for the full list. *

* @param int $type

* The type parameter selects the type of communication * to be used by the socket. See socket_create for the * full list. *

* @param int $protocol

* The protocol parameter sets the specific * protocol within the specified domain to be used * when communicating on the returned socket. The proper value can be retrieved by * name by using getprotobyname. If * the desired protocol is TCP, or UDP the corresponding constants * SOL_TCP, and SOL_UDP * can also be used. *

*

* See socket_create for the full list of supported * protocols. *

* @param array &$pair

* Reference to an array in which the two socket resources will be inserted. *

* @return bool TRUE on success or FALSE on failure. */ function socket_create_pair(int $domain, int $type, int $protocol, &$pair): bool { } /** * Accepts a connection on a socket * @link https://php.net/manual/en/function.socket-accept.php * @param resource|Socket $socket

* A valid socket resource created with socket_create. *

* @return resource|Socket|false a new socket resource on success, or FALSE on error. The actual * error code can be retrieved by calling * socket_last_error. This error code may be passed to * socket_strerror to get a textual explanation of the * error. */ function socket_accept(Socket $socket): Socket|false { } /** * Sets nonblocking mode for file descriptor fd * @link https://php.net/manual/en/function.socket-set-nonblock.php * @param resource|Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

* @return bool TRUE on success or FALSE on failure. */ function socket_set_nonblock(Socket $socket): bool { } /** * Sets blocking mode on a socket resource * @link https://php.net/manual/en/function.socket-set-block.php * @param resource|Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

* @return bool TRUE on success or FALSE on failure. */ function socket_set_block(Socket $socket): bool { } /** * Listens for a connection on a socket * @link https://php.net/manual/en/function.socket-listen.php * @param resource|Socket $socket

* A valid socket resource created with socket_create. *

* @param int $backlog [optional]

* A maximum of backlog incoming connections will be * queued for processing. If a connection request arrives with the queue * full the client may receive an error with an indication of * ECONNREFUSED, or, if the underlying protocol supports * retransmission, the request may be ignored so that retries may succeed. *

*

* The maximum number passed to the backlog * parameter highly depends on the underlying platform. On Linux, it is * silently truncated to SOMAXCONN. On win32, if * passed SOMAXCONN, the underlying service provider * responsible for the socket will set the backlog to a maximum * reasonable value. There is no standard provision to * find out the actual backlog value on this platform. *

* @return bool TRUE on success or FALSE on failure. The error code can be retrieved with * socket_last_error. This code may be passed to * socket_strerror to get a textual explanation of the * error. */ function socket_listen(Socket $socket, int $backlog = 0): bool { } /** * Closes a socket resource * @link https://php.net/manual/en/function.socket-close.php * @param resource|Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

* @return void No value is returned. */ function socket_close(Socket $socket): void { } /** * Write to a socket * @link https://php.net/manual/en/function.socket-write.php * @param resource|Socket $socket * @param string $data

* The buffer to be written. *

* @param int|null $length

* The optional parameter length can specify an * alternate length of bytes written to the socket. If this length is * greater than the buffer length, it is silently truncated to the length * of the buffer. *

* @return int|false the number of bytes successfully written to the socket or FALSE on failure. * The error code can be retrieved with * socket_last_error. This code may be passed to * socket_strerror to get a textual explanation of the * error. *

*

* It is perfectly valid for socket_write to * return zero which means no bytes have been written. Be sure to use the * === operator to check for FALSE in case of an * error. */ function socket_write(Socket $socket, string $data, ?int $length = null): int|false { } /** * Reads a maximum of length bytes from a socket * @link https://php.net/manual/en/function.socket-read.php * @param resource|Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

* @param int $length

* The maximum number of bytes read is specified by the * length parameter. Otherwise you can use * \r, \n, * or \0 to end reading (depending on the type * parameter, see below). *

* @param int $mode [optional]

* Optional type parameter is a named constant: * PHP_BINARY_READ (Default) - use the system * recv() function. Safe for reading binary data. * @return string|false socket_read returns the data as a string on success, * or FALSE on error (including if the remote host has closed the * connection). The error code can be retrieved with * socket_last_error. This code may be passed to * socket_strerror to get a textual representation of * the error. *

*

* socket_read returns a zero length string ("") * when there is no more data to read.

*/ function socket_read(Socket $socket, int $length, int $mode = PHP_BINARY_READ): string|false { } /** * Queries the local side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type * @link https://php.net/manual/en/function.socket-getsockname.php * @param resource|Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

* @param string &$address

* If the given socket is of type AF_INET * or AF_INET6, socket_getsockname * will return the local IP address in appropriate notation (e.g. * 127.0.0.1 or fe80::1) in the * address parameter and, if the optional * port parameter is present, also the associated port. *

*

* If the given socket is of type AF_UNIX, * socket_getsockname will return the Unix filesystem * path (e.g. /var/run/daemon.sock) in the * address parameter. *

* @param int &$port [optional]

* If provided, this will hold the associated port. *

* @return bool TRUE on success or FALSE on failure. socket_getsockname may also return * FALSE if the socket type is not any of AF_INET, * AF_INET6, or AF_UNIX, in which * case the last socket error code is not updated. */ function socket_getsockname(Socket $socket, &$address, &$port = null): bool { } /** * Queries the remote side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type * @link https://php.net/manual/en/function.socket-getpeername.php * @param resource|Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

* @param string &$address

* If the given socket is of type AF_INET or * AF_INET6, socket_getpeername * will return the peers (remote) IP address in * appropriate notation (e.g. 127.0.0.1 or * fe80::1) in the address * parameter and, if the optional port parameter is * present, also the associated port. *

*

* If the given socket is of type AF_UNIX, * socket_getpeername will return the Unix filesystem * path (e.g. /var/run/daemon.sock) in the * address parameter. *

* @param int &$port [optional]

* If given, this will hold the port associated to * address. *

* @return bool TRUE on success or FALSE on failure. socket_getpeername may also return * FALSE if the socket type is not any of AF_INET, * AF_INET6, or AF_UNIX, in which * case the last socket error code is not updated. */ function socket_getpeername(Socket $socket, &$address, &$port = null): bool { } /** * Initiates a connection on a socket * @link https://php.net/manual/en/function.socket-connect.php * @param resource|Socket $socket * @param string $address

* The address parameter is either an IPv4 address * in dotted-quad notation (e.g. 127.0.0.1) if * socket is AF_INET, a valid * IPv6 address (e.g. ::1) if IPv6 support is enabled and * socket is AF_INET6 * or the pathname of a Unix domain socket, if the socket family is * AF_UNIX. *

* @param int|null $port

* The port parameter is only used and is mandatory * when connecting to an AF_INET or an * AF_INET6 socket, and designates * the port on the remote host to which a connection should be made. *

* @return bool TRUE on success or FALSE on failure. The error code can be retrieved with * socket_last_error. This code may be passed to * socket_strerror to get a textual explanation of the * error. *

*

* If the socket is non-blocking then this function returns FALSE with an * error Operation now in progress. */ function socket_connect(Socket $socket, string $address, ?int $port = null): bool { } /** * Return a string describing a socket error * @link https://php.net/manual/en/function.socket-strerror.php * @param int $error_code

* A valid socket error number, likely produced by * socket_last_error. *

* @return string the error message associated with the errno * parameter. */ function socket_strerror(int $error_code): string { } /** * Binds a name to a socket * @link https://php.net/manual/en/function.socket-bind.php * @param resource|Socket $socket

* A valid socket resource created with socket_create. *

* @param string $address

* If the socket is of the AF_INET family, the * address is an IP in dotted-quad notation * (e.g. 127.0.0.1). *

*

* If the socket is of the AF_UNIX family, the * address is the path of a * Unix-domain socket (e.g. /tmp/my.sock). *

* @param int $port [optional]

* The port parameter is only used when * binding an AF_INET socket, and designates * the port on which to listen for connections. *

* @return bool TRUE on success or FALSE on failure. *

* The error code can be retrieved with socket_last_error. * This code may be passed to socket_strerror to get a * textual explanation of the error. *

*/ function socket_bind(Socket $socket, string $address, int $port = 0): bool { } /** * Receives data from a connected socket * @link https://php.net/manual/en/function.socket-recv.php * @param resource|Socket $socket

* The socket must be a socket resource previously * created by socket_create(). *

* @param string &$data

* The data received will be fetched to the variable specified with * buf. If an error occurs, if the * connection is reset, or if no data is * available, buf will be set to NULL. *

* @param int $length

* Up to len bytes will be fetched from remote host. *

* @param int $flags

* The value of flags can be any combination of * the following flags, joined with the binary OR (|) * operator. *

* * Possible values for flags * * * * * * * * * * * * * * * * * * * * *
FlagDescription
MSG_OOB * Process out-of-band data. *
MSG_PEEK * Receive data from the beginning of the receive queue without * removing it from the queue. *
MSG_WAITALL * Block until at least len are received. * However, if a signal is caught or the remote host disconnects, the * function may return less data. *
MSG_DONTWAIT * With this flag set, the function returns even if it would normally * have blocked. *
* @return int|false socket_recv returns the number of bytes received, * or FALSE if there was an error. The actual error code can be retrieved by * calling socket_last_error. This error code may be * passed to socket_strerror to get a textual explanation * of the error. */ function socket_recv(Socket $socket, &$data, int $length, int $flags): int|false { } /** * Sends data to a connected socket * @link https://php.net/manual/en/function.socket-send.php * @param resource|Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

* @param string $data

* A buffer containing the data that will be sent to the remote host. *

* @param int $length

* The number of bytes that will be sent to the remote host from * buf. *

* @param int $flags

* The value of flags can be any combination of * the following flags, joined with the binary OR (|) * operator. * * Possible values for flags * * * * * * * * * * * * * * * * *
MSG_OOB * Send OOB (out-of-band) data. *
MSG_EOR * Indicate a record mark. The sent data completes the record. *
MSG_EOF * Close the sender side of the socket and include an appropriate * notification of this at the end of the sent data. The sent data * completes the transaction. *
MSG_DONTROUTE * Bypass routing, use direct interface. *
*

* @return int|false socket_send returns the number of bytes sent, or FALSE on error. */ function socket_send(Socket $socket, string $data, int $length, int $flags): int|false { } /** * (PHP 5 >=5.5.0)
* Send a message * @link https://secure.php.net/manual/en/function.socket-sendmsg.php * @param resource|Socket $socket * @param array $message * @param int $flags * @return int|false * @since 5.5 */ function socket_sendmsg( Socket $socket, array $message, #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = 0, ): int|false { } /** * Receives data from a socket whether or not it is connection-oriented * @link https://php.net/manual/en/function.socket-recvfrom.php * @param resource|Socket $socket

* The socket must be a socket resource previously * created by socket_create(). *

* @param string &$data

* The data received will be fetched to the variable specified with * buf. *

* @param int $length

* Up to len bytes will be fetched from remote host. *

* @param int $flags

* The value of flags can be any combination of * the following flags, joined with the binary OR (|) * operator. *

* * Possible values for flags * * * * * * * * * * * * * * * * * * * * *
FlagDescription
MSG_OOB * Process out-of-band data. *
MSG_PEEK * Receive data from the beginning of the receive queue without * removing it from the queue. *
MSG_WAITALL * Block until at least len are received. * However, if a signal is caught or the remote host disconnects, the * function may return less data. *
MSG_DONTWAIT * With this flag set, the function returns even if it would normally * have blocked. *
* @param string &$address

* If the socket is of the type AF_UNIX type, * name is the path to the file. Else, for * unconnected sockets, name is the IP address of, * the remote host, or NULL if the socket is connection-oriented. *

* @param int &$port [optional]

* This argument only applies to AF_INET and * AF_INET6 sockets, and specifies the remote port * from which the data is received. If the socket is connection-oriented, * port will be NULL. *

* @return int|false socket_recvfrom returns the number of bytes received, * or FALSE if there was an error. The actual error code can be retrieved by * calling socket_last_error. This error code may be * passed to socket_strerror to get a textual explanation * of the error. */ function socket_recvfrom(Socket $socket, &$data, int $length, int $flags, &$address, &$port = null): int|false { } /** * Read a message * @link https://secure.php.net/manual/en/function.socket-recvmsg.php * @param resource|Socket $socket * @param array &$message * @param int $flags * @return int|false * @since 5.5 */ function socket_recvmsg( Socket $socket, array &$message, #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = 0, ): int|false { } /** * Sends a message to a socket, whether it is connected or not * @link https://php.net/manual/en/function.socket-sendto.php * @param resource|Socket $socket

* A valid socket resource created using socket_create. *

* @param string $data

* The sent data will be taken from buffer buf. *

* @param int $length

* len bytes from buf will be * sent. *

* @param int $flags

* The value of flags can be any combination of * the following flags, joined with the binary OR (|) * operator. * * Possible values for flags * * * * * * * * * * * * * * * * *
MSG_OOB * Send OOB (out-of-band) data. *
MSG_EOR * Indicate a record mark. The sent data completes the record. *
MSG_EOF * Close the sender side of the socket and include an appropriate * notification of this at the end of the sent data. The sent data * completes the transaction. *
MSG_DONTROUTE * Bypass routing, use direct interface. *
*

* @param string $address

* IP address of the remote host. *

* @param int|null $port

* port is the remote port number at which the data * will be sent. *

* @return int|false socket_sendto returns the number of bytes sent to the * remote host, or FALSE if an error occurred. */ function socket_sendto( Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null, ): int|false { } /** * Gets socket options for the socket * @link https://php.net/manual/en/function.socket-get-option.php * @param resource|Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

* @param int $level

* The level parameter specifies the protocol * level at which the option resides. For example, to retrieve options at * the socket level, a level parameter of * 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. *

* @param int $option * Available Socket Options * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
OptionDescriptionType
SO_DEBUG * Reports whether debugging information is being recorded. * * int *
SO_BROADCAST * Reports whether transmission of broadcast messages is supported. * * int *
SO_REUSEADDR * Reports whether local addresses can be reused. * * int *
SO_KEEPALIVE * Reports whether connections are kept active with periodic transmission * of messages. If the connected socket fails to respond to these messages, * the connection is broken and processes writing to that socket are notified * with a SIGPIPE signal. * * int *
SO_LINGER *

* Reports whether the socket lingers on * socket_close if data is present. By default, * when the socket is closed, it attempts to send all unsent data. * In the case of a connection-oriented socket, * socket_close will wait for its peer to * acknowledge the data. *

*

* If l_onoff is non-zero and * l_linger is zero, all the * unsent data will be discarded and RST (reset) is sent to the * peer in the case of a connection-oriented socket. *

*

* On the other hand, if l_onoff is * non-zero and l_linger is non-zero, * socket_close will block until all the data * is sent or the time specified in l_linger * elapses. If the socket is non-blocking, * socket_close will fail and return an error. *

*
* array. The array will contain two keys: * l_onoff and * l_linger. *
SO_OOBINLINE * Reports whether the socket leaves out-of-band data inline. * * int *
SO_SNDBUF * Reports the size of the send buffer. * * int *
SO_RCVBUF * Reports the size of the receive buffer. * * int *
SO_ERROR * Reports information about error status and clears it. * * int (cannot be set by socket_set_option) *
SO_TYPE * Reports the socket type (e.g. * SOCK_STREAM). * * int (cannot be set by socket_set_option) *
SO_DONTROUTE * Reports whether outgoing messages bypass the standard routing facilities. * * int *
SO_RCVLOWAT * Reports the minimum number of bytes to process for socket * input operations. * * int *
SO_RCVTIMEO * Reports the timeout value for input operations. * * array. The array will contain two keys: * sec which is the seconds part on the timeout * value and usec which is the microsecond part * of the timeout value. *
SO_SNDTIMEO * Reports the timeout value specifying the amount of time that an output * function blocks because flow control prevents data from being sent. * * array. The array will contain two keys: * sec which is the seconds part on the timeout * value and usec which is the microsecond part * of the timeout value. *
SO_SNDLOWAT * Reports the minimum number of bytes to process for socket output operations. * * int *
TCP_NODELAY * Reports whether the Nagle TCP algorithm is disabled. * * int *
MCAST_JOIN_GROUP * Joins a multicast group. (added in PHP 5.4) * * array with keys "group", specifying * a string with an IPv4 or IPv6 multicast address and * "interface", specifying either an interface * number (type int) or a string with * the interface name, like "eth0". * 0 can be specified to indicate the interface * should be selected using routing rules. (can only be used in * socket_set_option) *
MCAST_LEAVE_GROUP * Leaves a multicast group. (added in PHP 5.4) * * array. See MCAST_JOIN_GROUP for * more information. (can only be used in * socket_set_option) *
MCAST_BLOCK_SOURCE * Blocks packets arriving from a specific source to a specific * multicast group, which must have been previously joined. * (added in PHP 5.4) * * array with the same keys as * MCAST_JOIN_GROUP, plus one extra key, * source, which maps to a string * specifying an IPv4 or IPv6 address of the source to be blocked. * (can only be used in socket_set_option) *
MCAST_UNBLOCK_SOURCE * Unblocks (start receiving again) packets arriving from a specific * source address to a specific multicast group, which must have been * previously joined. (added in PHP 5.4) * * array with the same format as * MCAST_BLOCK_SOURCE. * (can only be used in socket_set_option) *
MCAST_JOIN_SOURCE_GROUP * Receive packets destined to a specific multicast group whose source * address matches a specific value. (added in PHP 5.4) * * array with the same format as * MCAST_BLOCK_SOURCE. * (can only be used in socket_set_option) *
MCAST_LEAVE_SOURCE_GROUP * Stop receiving packets destined to a specific multicast group whose * soure address matches a specific value. (added in PHP 5.4) * * array with the same format as * MCAST_BLOCK_SOURCE. * (can only be used in socket_set_option) *
IP_MULTICAST_IF * The outgoing interface for IPv4 multicast packets. * (added in PHP 5.4) * * Either int specifying the interface number or a * string with an interface name, like * eth0. The value 0 can be used to * indicate the routing table is to used in the interface selection. * The function socket_get_option returns an * interface index. * Note that, unlike the C API, this option does NOT take an IP * address. This eliminates the interface difference between * IP_MULTICAST_IF and * IPV6_MULTICAST_IF. *
IPV6_MULTICAST_IF * The outgoing interface for IPv6 multicast packets. * (added in PHP 5.4) * * The same as IP_MULTICAST_IF. *
IP_MULTICAST_LOOP * The multicast loopback policy for IPv4 packets, which * determines whether multicast packets sent by this socket also reach * receivers in the same host that have joined the same multicast group * on the outgoing interface used by this socket. This is the case by * default. * (added in PHP 5.4) * * int (either 0 or * 1). For socket_set_option * any value will be accepted and will be converted to a boolean * following the usual PHP rules. *
IPV6_MULTICAST_LOOP * Analogous to IP_MULTICAST_LOOP, but for IPv6. * (added in PHP 5.4) * * int. See IP_MULTICAST_LOOP. *
IP_MULTICAST_TTL * The time-to-live of outgoing IPv4 multicast packets. This should be * a value between 0 (don't leave the interface) and 255. The default * value is 1 (only the local network is reached). * (added in PHP 5.4) * * int between 0 and 255. *
IPV6_MULTICAST_HOPS * Analogous to IP_MULTICAST_TTL, but for IPv6 * packets. The value -1 is also accepted, meaning the route default * should be used. * (added in PHP 5.4) * * int between -1 and 255. *
* @return array|int|false the value of the given option, or FALSE on errors. */ function socket_get_option(Socket $socket, int $level, int $option): array|int|false { } /** * Sets socket options for the socket * @link https://php.net/manual/en/function.socket-set-option.php * @param resource|Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

* @param int $level

* The level parameter specifies the protocol * level at which the option resides. For example, to retrieve options at * the socket level, a level parameter of * 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. *

* @param int $option

* The available socket options are the same as those for the * socket_get_option function. *

* @param mixed $value

* The option value. *

* @return bool TRUE on success or FALSE on failure. */ function socket_set_option(Socket $socket, int $level, int $option, $value): bool { } /** * Shuts down a socket for receiving, sending, or both * @link https://php.net/manual/en/function.socket-shutdown.php * @param resource|Socket $socket

* A valid socket resource created with socket_create. *

* @param int $mode [optional]

* 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 *
*

* @return bool TRUE on success or FALSE on failure. */ function socket_shutdown(Socket $socket, int $mode = 2): bool { } /** * Returns the last error on the socket * @link https://php.net/manual/en/function.socket-last-error.php * @param resource|Socket $socket [optional]

* A valid socket resource created with socket_create. *

* @return int This function returns a socket error code. */ function socket_last_error(?Socket $socket = null): int { } /** * Clears the error on the socket or the last error code * @link https://php.net/manual/en/function.socket-clear-error.php * @param resource|Socket|null $socket [optional]

* A valid socket resource created with socket_create. *

* @return void No value is returned. */ function socket_clear_error(?Socket $socket = null): void { } /** * Import a stream * @link https://php.net/manual/en/function.socket-import-stream.php * @param resource|Socket $stream

* The stream resource to import. *

* @return resource|Socket|false|null FALSE or NULL on failure. * @since 5.4 */ function socket_import_stream($stream): Socket|false { } /** * Calculate message buffer size * @link https://php.net/manual/en/function.socket-cmsg-space.php * @param int $level * @param int $type * @param int $num [optional] * @return int|null * @since 5.5 */ function socket_cmsg_space( int $level, int $type, #[PhpStormStubsElementAvailable(from: '8.0')] int $num = 0, ): ?int { } /** * Alias of {@see socket_get_option} * @param Socket $socket * @param int $level * @param int $option */ function socket_getopt(Socket $socket, int $level, int $option): array|int|false { } /** * Alias of {@see socket_set_option} * @param Socket $socket * @param int $level * @param int $option * @param $value * @return bool */ function socket_setopt(Socket $socket, int $level, int $option, $value): bool { } /** * Exports the WSAPROTOCOL_INFO Structure * * @link https://www.php.net/manual/en/function.socket-wsaprotocol-info-export.php * * @param resource|Socket $socket * @param int $target_pid * @return string|false * * @since 7.3 */ function socket_wsaprotocol_info_export($socket, $target_pid) { } /** * Imports a Socket from another Process * * @link https://www.php.net/manual/en/function.socket-wsaprotocol-info-import.php * * @param string $info_id * @return resource|Socket|false * * @since 7.3 */ function socket_wsaprotocol_info_import($info_id) { } /** * Releases an exported WSAPROTOCOL_INFO Structure * * @link https://www.php.net/manual/en/function.socket-wsaprotocol-info-release.php * * @param string $info_id * @return bool * * @since 7.3 */ function socket_wsaprotocol_info_release($info_id) { } __halt_compiler();----SIGNATURE:----JwoPmwREqgLRYor5Uxp+rK3Ecr76aIO3Tsr6jjMUaSQDuGNh2VfsWRbP83v5R02+l7uS6wBClGccTcxzHi0AOxbd6sZy0tfXc2MWLZP4FQY/bebnmgqMJSoUATM1hEb4gMse0QjPeF4HDOoEZKTvi3YY8zrb565BFGFQq275oPr2r8JR3ORrqujFv6C379SNwufI5pRcenfcNjcMWkIIWjLo9JXgBATasT4z3JM5lGNz0rhxqHOMgRQkquFDp838rNu7CFJCy9z1kKhRjauiWwnYlTrAozENAhFg/Oj1fiXDFMQuZ48ug9JPoyk1Ddn6Y22DlQYAs8Ba1UQZzcse+fPQVo/02c7fjmbF6BGgdVwT0yU3GK0h/ksfWZSJHZLcrNKEYR5bpWa7HipudqMBYiiHso8YZzSyELhzJ8PExq7pCLIn1TlUXxUlpxwNj6mKodhWMA4f5aJJI424Sx3b7jMS8kSYgh+Q9Kk/kKt0LQgPPA8Cn2xr4sDcdrDHKWjXVPcEmoEqdW4zWStS+qSgYAFmmrucj9ZOy/c114e0Qas3cyg6VYbS/hpxHe7F+ZE7pvlFt3ntYeatrTpEfSSQ7qLLfDhb/sS0fCIZS/tEKj6fH1v7ZK9MzTllJD/gEThPLcGIeMhMKoiHq8PpByD9FKDZQ/NDDwCl5HPvEKIwGtQ=----ATTACHMENT:----OTEwMTUxMTkyMDcwNzU1NiA5NzkzMTkyNjczMjc4OTEgNzU1MjE1NTkxOTg1NDIxMw==