Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<socket_writesocket_wsaprotocol_info_import>
^Socket FunctionsLast updated: Mon, 26 Oct 2026

socket_wsaprotocol_info_export

(PHP 7 >= 7.3.0, PHP 8)

socket_wsaprotocol_info_export — Exports the WSAPROTOCOL_INFO Structure

Description

function socket_wsaprotocol_info_export(Socket $socket, int $process_id): string|false

Exports the WSAPROTOCOL_INFO structure into shared memory and returns an identifier to be used with socket_wsaprotocol_info_import(). The exported ID is only valid for the given process_id.

Note:

This function is available only on Windows.

Parameters

socket

A Socket instance.

process_id

The ID of the process which will import the socket.

Return Values

Returns an identifier to be used for the import, or false on failure

Changelog

Version Description
8.0.0 socket is a Socket instance now; previously, it was a resource.

See Also


<socket_writesocket_wsaprotocol_info_import>
^Socket FunctionsLast updated: Mon, 26 Oct 2026