|int|false * @refcount 1 */ function socket_get_option(Socket $socket, int $level, int $option): array|int|false {} /** * @return array|int|false * @alias socket_get_option */ function socket_getopt(Socket $socket, int $level, int $option): array|int|false {} /** @param array|string|int $value */ function socket_set_option(Socket $socket, int $level, int $option, $value): bool {} /** * @param array|string|int $value * @alias socket_set_option */ function socket_setopt(Socket $socket, int $level, int $option, $value): bool {} #ifdef HAVE_SOCKETPAIR /** @param array $pair */ function socket_create_pair(int $domain, int $type, int $protocol, &$pair): bool {} #endif #ifdef HAVE_SHUTDOWN function socket_shutdown(Socket $socket, int $mode = 2): bool {} #endif function socket_last_error(?Socket $socket = null): int {} function socket_clear_error(?Socket $socket = null): void {} /** @param resource $stream */ function socket_import_stream($stream): Socket|false {} /** @return resource|false */ function socket_export_stream(Socket $socket) {} function socket_sendmsg(Socket $socket, array $message, int $flags = 0): int|false {} function socket_recvmsg(Socket $socket, array &$message, int $flags = 0): int|false {} function socket_cmsg_space(int $level, int $type, int $num = 0): ?int {} /** * @return array|false * @refcount 1 */ function socket_addrinfo_lookup(string $host, ?string $service = null, array $hints = []): array|false {} function socket_addrinfo_connect(AddressInfo $address): Socket|false {} function socket_addrinfo_bind(AddressInfo $address): Socket|false {} /** * @return array * @refcount 1 */ function socket_addrinfo_explain(AddressInfo $address): array {} #ifdef PHP_WIN32 function socket_wsaprotocol_info_export(Socket $socket, int $process_id): string|false {} function socket_wsaprotocol_info_import(string $info_id): Socket|false {} function socket_wsaprotocol_info_release(string $info_id): bool {} #endif