Windows Winsock2 declarations for startup, sockets, byte order, address resolution, and overlapped I/O.
Constants
Address and socket selection
| Name | Value | Meaning |
|---|---|---|
AF_INET | 2 | IPv4 address family. |
INADDR_ANY | 0x00000000n32 | Wildcard local IPv4 address. |
INVALID_SOCKET | all bits set (Natx) | Socket result that indicates failure. |
SOCK_STREAM | 1 | Stream socket type. |
IPPROTO_TCP | 6 | TCP protocol selector. |
Address-resolution namespaces
| Name | Value | Meaning |
|---|---|---|
NS_DNS | 12 | DNS namespace for GetAddrInfoExW. |
Socket options
| Name | Value | Meaning |
|---|---|---|
SOL_SOCKET | 0xFFFF | Socket-level option level. |
SOMAXCONN | 0x7FFFFFFF | Requests the provider's maximum reasonable listen backlog. |
SO_EXCLUSIVEADDRUSE | -5 | Exclusive local-address-use option. |
SO_UPDATE_ACCEPT_CONTEXT | 0x700B | Accept-context update option. |
SO_UPDATE_CONNECT_CONTEXT | 0x7010 | Connect-context update option. |
TCP_NODELAY | 1 | Disables Nagle's algorithm for a TCP socket. |
Shutdown modes
| Name | Value | Meaning |
|---|---|---|
SD_RECEIVE | 0 | Disables receiving on a socket. |
SD_SEND | 1 | Disables sending on a socket. |
SD_BOTH | 2 | Disables sending and receiving on a socket. |
I/O-control codes
| Name | Value | Meaning |
|---|---|---|
FIONBIO | -2147195266 | Sets a socket's nonblocking mode through ioctlsocket. |
SIO_GET_EXTENSION_FUNCTION_POINTER | 0xC8000006n32 | Requests an extension-function pointer through WSAIoctl. |
Winsock status codes
| Name | Value | Meaning |
|---|---|---|
WSAEWOULDBLOCK | 10035 | Nonblocking operation would block. |
WSA_INVALID_HANDLE | 6 | Handle is invalid. |
WSA_IO_PENDING | 997 | Overlapped operation is pending. |
Extension-function identifiers
| Name | Value | Meaning |
|---|---|---|
WSAID_ACCEPTEX | (0xB5367DF1n32 0xCBACn16 0x11CFn16 (0x95n8 0xCAn8 0x00n8 0x80n8 0x5Fn8 0x48n8 0xA1n8 0x92n8)) | Identifier for the AcceptEx extension function. |
WSAID_CONNECTEX | (0x25A207B9n32 0xDDF3n16 0x4660n16 (0x8En8 0xE9n8 0x76n8 0xE5n8 0x8Cn8 0x74n8 0x06n8 0x3En8)) | Identifier for the ConnectEx extension function. |
WSAID_GETACCEPTEXSOCKADDRS | (0xB5367DF2n32 0xCBACn16 0x11CFn16 (0x95n8 0xCAn8 0x00n8 0x80n8 0x5Fn8 0x48n8 0xA1n8 0x92n8)) | Identifier for the GetAcceptExSockaddrs extension function. |
Startup-data lengths
| Name | Value | Meaning |
|---|---|---|
WSADESCRIPTION_LEN | 256 | Description length used by WSADATA. |
WSASYS_STATUS_LEN | 128 | System-status length used by WSADATA. |
Schemas
For FN_ACCEPTEXRef, FN_CONNECTEXRef, FN_GETACCEPTEXSOCKADDRSRef, LPLOOKUPSERVICE_COMPLETION_ROUTINERef, and WSAOVERLAPPED_COMPLETION_ROUTINERef, each parenthesized effect describes invocation of a non-NIL Code value; evaluating these five names produces NIL Code descriptors.
FN_ACCEPTEXRef
(lpOverlapped lpdwBytesReceived dwRemoteAddressLength dwLocalAddressLength dwReceiveDataLength lpOutputBuffer sAcceptSocket sListenSocket -- result) Defines the AcceptEx callback schema.callback schema
Parameters
| Parameter | Schema | Role |
|---|---|---|
sListenSocket | Natx | listening socket handle |
sAcceptSocket | Natx | open socket handle, neither bound nor connected, on which to accept the connection |
lpOutputBuffer | Natx | address of a caller-owned buffer receiving initial data followed by local and remote address records |
dwReceiveDataLength | Nat32 | initial receive-data length in bytes |
dwLocalAddressLength | Nat32 | local-address storage length in bytes, at least 16 bytes larger than the protocol's maximum address size |
dwRemoteAddressLength | Nat32 | remote-address storage length in bytes, at least 16 bytes larger than the protocol's maximum address size |
lpdwBytesReceived | Nat32 Ref | storage receiving the received-byte count only on immediate completion |
lpOverlapped | OVERLAPPED Ref | required non-NIL overlapped operation record |
Outputs
result:Int32nonzero on immediate completion, or0on failure or pending completion.
FN_CONNECTEXRef
(lpOverlapped lpdwBytesSent dwSendDataLength lpSendBuffer namelen name s -- result) Defines the ConnectEx callback schema.callback schema
Parameters
| Parameter | Schema | Role |
|---|---|---|
s | Natx | previously bound, unconnected socket handle |
name | Natx | address of the destination address record |
namelen | Int32 | destination address length in bytes |
lpSendBuffer | Natx | address of the initial send buffer, or 0nx for none |
dwSendDataLength | Nat32 | initial send-data length in bytes |
lpdwBytesSent | Nat32 Ref | storage receiving the sent-byte count on successful return, ignored when lpSendBuffer is 0nx |
lpOverlapped | OVERLAPPED Ref | required non-NIL overlapped operation record |
Outputs
result:Int32nonzero on immediate completion, or0on failure or pending completion.
FN_GETACCEPTEXSOCKADDRSRef
(RemoteSockaddrLength RemoteSockaddr LocalSockaddrLength LocalSockaddr dwRemoteAddressLength dwLocalAddressLength dwReceiveDataLength lpOutputBuffer --) Defines the GetAcceptExSockaddrs callback schema.callback schema
Parameters
| Parameter | Schema | Role |
|---|---|---|
lpOutputBuffer | Natx | address of the AcceptEx output buffer |
dwReceiveDataLength | Nat32 | initial receive-data length in bytes |
dwLocalAddressLength | Nat32 | local-address storage length in bytes |
dwRemoteAddressLength | Nat32 | remote-address storage length in bytes |
LocalSockaddr | sockaddr AsRef Ref | caller-owned pointer-to-pointer storage; the filled AsRef wrapper's data field holds the local socket-address pointer, which points into lpOutputBuffer |
LocalSockaddrLength | Int32 Ref | storage receiving the local address length in bytes |
RemoteSockaddr | sockaddr AsRef Ref | caller-owned pointer-to-pointer storage; the filled AsRef wrapper's data field holds the remote socket-address pointer, which points into lpOutputBuffer |
RemoteSockaddrLength | Int32 Ref | storage receiving the remote address length in bytes |
- Pass the same
lpOutputBufferand the same three length values used for AcceptEx.
LPLOOKUPSERVICE_COMPLETION_ROUTINERef
(lpOverlapped dwBytes dwError --) Defines the address-resolution completion callback schema.callback schema
Parameters
| Parameter | Schema | Role |
|---|---|---|
dwError | Nat32 | completion error code |
dwBytes | Nat32 | reserved |
lpOverlapped | OVERLAPPED Ref | completed operation record |
WSAOVERLAPPED_COMPLETION_ROUTINERef
(dwFlags lpOverlapped cbTransferred dwError --) Defines the overlapped completion callback schema.callback schema
Parameters
| Parameter | Schema | Role |
|---|---|---|
dwError | Nat32 | completion error code |
cbTransferred | Nat32 | transferred-byte count |
lpOverlapped | OVERLAPPED Ref | completed operation record |
dwFlags | Nat32 | completion flags |
- An
OVERLAPPEDobject can be the first field of a larger caller-owned context object.
ADDRINFOEXW
(-- ADDRINFOEXW) Defines one extended address-resolution result record.Dict schema
| Field | Schema | Role |
|---|---|---|
ai_flags | Int32 | address-resolution flags |
ai_family | Int32 | address family |
ai_socktype | Int32 | socket type |
ai_protocol | Int32 | protocol selector |
ai_addrlen | Natx | address length in bytes |
ai_canonname | Natx | address of the zero-terminated UTF-16 canonical name |
ai_addr | Natx | address of the socket-address record |
ai_blob | Natx | address of namespace-provider data |
ai_bloblen | Natx | size in bytes of the data at ai_blob |
ai_provider | Natx | address of the namespace-provider GUID |
ai_next | Natx | address of the next result record |
WSABUF
(-- WSABUF) Defines one overlapped buffer descriptor.Dict schema
WSADATA
(-- WSADATA) Defines Winsock startup version, limits, vendor, and status data.Dict schema
64-bit Windows
| Field | Schema | Role |
|---|---|---|
wVersion | Nat16 | negotiated Winsock version |
wHighVersion | Nat16 | highest supported Winsock version |
iMaxSockets | Nat16 | legacy socket-count limit (ignored for Winsock 2 and later) |
iMaxUdpDg | Nat16 | legacy UDP datagram-size limit in bytes (ignored for Winsock 2 and later) |
lpVendorInfo | Nat8 Ref | legacy vendor information (ignored for Winsock 2 and later) |
szDescription | Nat8 257 array | Winsock description string storage |
szSystemStatus | Nat8 129 array | Winsock system-status string storage |
32-bit Windows
| Field | Schema | Role |
|---|---|---|
wVersion | Nat16 | negotiated Winsock version |
wHighVersion | Nat16 | highest supported Winsock version |
szDescription | Nat8 257 array | Winsock description string storage |
szSystemStatus | Nat8 129 array | Winsock system-status string storage |
iMaxSockets | Nat16 | legacy socket-count limit (ignored for Winsock 2 and later) |
iMaxUdpDg | Nat16 | legacy UDP datagram-size limit in bytes (ignored for Winsock 2 and later) |
lpVendorInfo | Nat8 Ref | legacy vendor information (ignored for Winsock 2 and later) |
addrinfo
(-- addrinfo) Defines one address-resolution result record.Dict schema
| Field | Schema | Role |
|---|---|---|
ai_flags | Int32 | address-resolution flags |
ai_family | Int32 | address family |
ai_socktype | Int32 | socket type |
ai_protocol | Int32 | protocol selector |
ai_addrlen | Natx | address length in bytes |
ai_canonname | Natx | address of the zero-terminated canonical name |
ai_addr | Natx | address of the socket-address record |
ai_next | Natx | address of the next result record |
fd_set
(-- fd_set) Defines one descriptor set for readiness queries.Dict schema
sockaddr
(-- sockaddr) Defines the generic socket-address record.Dict schema
sockaddr_in
(-- sockaddr_in) Defines the IPv4 socket-address record.Dict schema
Imported functions
Stack effects list a C function's parameters with the first parameter on top; see the stack-order rule.
FreeAddrInfoExW
(pAddrInfoEx --) Releases an extended address-resolution result list.Inputs
pAddrInfoEx:ADDRINFOEXWRefextended address-resolution list to release.
Outputs
- None.
GetAddrInfoExCancel
(lpHandle -- result) Cancels an asynchronous extended address-resolution request.Inputs
lpHandle:NatxRefstorage that holds the request handle received fromGetAddrInfoExW.
Outputs
result:Int320 on success, a nonzero error code on failure;WSA_INVALID_HANDLEwhen the request has already completed or timed out, or the handle is invalid.
GetAddrInfoExW
(lpHandle lpCompletionRoutine lpOverlapped timeout ppResult hints lpNspId dwNameSpace pServiceName pName -- result) Resolves a node and service into an extended address list.Inputs
lpHandle:NatxRefcaller-owned storage that receives the handle of an asynchronous request, used withGetAddrInfoExCancel, or a typedNILNatx Reffor none.lpCompletionRoutine:LPLOOKUPSERVICE_COMPLETION_ROUTINERefcompletion callback, orNILfor none.lpOverlapped:OVERLAPPEDRefoverlapped operation record, whosehEventmust be0nxwith a completion callback and the handle of a manual-reset event without one, or a typedNILOVERLAPPED Reffor synchronous resolution.timeout:timevalReftimeout interval, or a typedNILtimeval Reffor none.ppResult:Natxaddress passed as an integer to writable storage that receives the address of the first result record; view that address withADDRINFOEXW addressToReferenceand pass the reference toFreeAddrInfoExW.hints:ADDRINFOEXWCrefborrowed address-resolution hints, whoseai_addrlen,ai_canonname,ai_addr, andai_nextmust be0nx.lpNspId:Natxaddress of a namespace-provider GUID, or0nxfor none.dwNameSpace:Nat32namespace selector;NS_DNSisInt32: pass it asNS_DNS Nat32 cast.pServiceName:Natxaddress of a zero-terminated UTF-16 string naming the service, or0nxfor none.pName:Natxaddress of a zero-terminated UTF-16 string naming the node, or0nxwhenpServiceNameis provided.
Outputs
result:Int320 on success,WSA_IO_PENDINGwhen the request is pending, or another nonzero error code on failure.
WSACleanup
(-- result) Cleans up one successful Winsock initialization.Inputs
- None.
Outputs
result:Int320 on success,-1on failure.
WSAGetLastError
(-- result) Returns the calling thread's last Winsock error code.Inputs
- None.
Outputs
result:Int32last Winsock error code.
WSAGetOverlappedResult
(lpdwFlags fWait lpcbTransfer lpOverlapped s -- result) Retrieves the result of one overlapped socket operation.Inputs
lpdwFlags:Nat32Refcaller-owned storage that receives final operation flags.fWait:Int32nonzero to wait (event-based notification only), or0to return without waiting.lpcbTransfer:Nat32Refcaller-owned storage that receives the transferred-byte count.lpOverlapped:OVERLAPPEDRefoverlapped operation record.s:Natxsocket handle for the operation.
Outputs
result:Int32nonzero on success, 0 on failure.
WSAIoctl
(lpCompletionRoutine lpOverlapped lpcbBytesReturned cbOutBuffer lpvOutBuffer cbInBuffer lpvInBuffer dwIoControlCode s -- result) Controls a socket and supports extension-function lookup.Inputs
lpCompletionRoutine:WSAOVERLAPPED_COMPLETION_ROUTINERefcompletion callback, orNILfor none.lpOverlapped:OVERLAPPEDRefoverlapped operation record, or a typedNILOVERLAPPED Reffor synchronous I/O.lpcbBytesReturned:Nat32Refcaller-owned storage that receives the output byte count on immediate completion.cbOutBuffer:Nat32output-buffer size in bytes.lpvOutBuffer:Natxaddress of the output buffer, or0nxfor none.cbInBuffer:Nat32input-buffer size in bytes.lpvInBuffer:Natxaddress of the input buffer, or0nxfor none.dwIoControlCode:Nat32socket-control code.s:Natxsocket handle.
Outputs
result:Int320 on success,-1on failure; an overlapped call can return-1withWSA_IO_PENDING.
Remarks
- With
SIO_GET_EXTENSION_FUNCTION_POINTER,lpvInBufferaddresses aWSAID_*identifier andlpvOutBufferaddresses caller-owned storage for the returned extension-function pointer. - Use
FN_ACCEPTEXRefforWSAID_ACCEPTEX,FN_CONNECTEXRefforWSAID_CONNECTEX, andFN_GETACCEPTEXSOCKADDRSRefforWSAID_GETACCEPTEXSOCKADDRS. - Wrap the matching schema with
AsRef(for example,fn: FN_ACCEPTEXRef AsRef;); pass@fn storageAddressaslpvOutBufferand@fn storageSize Nat32 castascbOutBuffer; after success,@fn.@datais the returned Code value. - When the buffer supplies a raw address, reconstruct it before calling with
address FN_ACCEPTEXRef addressToReference, or the matchingFN_*Refschema.
WSARecv
(lpCompletionRoutine lpOverlapped lpFlags lpNumberOfBytesRecvd dwBufferCount lpBuffers s -- result) Receives data from a socket, synchronously or with overlapped I/O.Inputs
lpCompletionRoutine:WSAOVERLAPPED_COMPLETION_ROUTINERefcompletion callback, orNILfor none.lpOverlapped:OVERLAPPEDRefoverlapped operation record, or a typedNILOVERLAPPED Reffor synchronous I/O.lpFlags:Nat32Refcaller-owned input/output receive flags, updated only on immediate completion; see the Windows parameter documentation for the documented flag values.lpNumberOfBytesRecvd:Nat32Refcaller-owned storage for bytes received on immediate completion. ThisNat32 Refmay beNILonly whenlpOverlappedis non-NIL.dwBufferCount:Nat32number ofWSABUFdescriptors.lpBuffers:WSABUFRefdescriptor array for the receive buffers.s:Natxsocket handle.
Outputs
result:Int320 on success,-1on failure; an overlapped call can return-1withWSA_IO_PENDING.
WSASend
(lpCompletionRoutine lpOverlapped dwFlags lpNumberOfBytesSent dwBufferCount lpBuffers s -- result) Sends data through a socket, synchronously or with overlapped I/O.Inputs
lpCompletionRoutine:WSAOVERLAPPED_COMPLETION_ROUTINERefcompletion callback, orNILfor none.lpOverlapped:OVERLAPPEDRefoverlapped operation record, or a typedNILOVERLAPPED Reffor synchronous I/O.dwFlags:Nat32send flags, normally0n32; see the Windows parameter documentation for the documented flag values.lpNumberOfBytesSent:Nat32Refcaller-owned storage for bytes sent on immediate completion. ThisNat32 Refmay beNILonly whenlpOverlappedis non-NIL.dwBufferCount:Nat32number ofWSABUFdescriptors.lpBuffers:WSABUFRefdescriptor array for the send buffers.s:Natxsocket handle.
Outputs
result:Int320 on success,-1on failure; an overlapped call can return-1withWSA_IO_PENDING.
WSASetLastError
(iError --) Sets the calling thread's last Winsock error code.Inputs
iError:Int32Winsock error code to store.
Outputs
- None.
WSAStartup
(lpWSAData wVersionRequested -- result) Initializes Winsock and fills startup data.Inputs
lpWSAData:WSADATARefcaller-owned startup-data storage that the call fills.wVersionRequested:Nat16requested Winsock version.
Outputs
result:Int320 on success, a nonzero error code on failure.
Remarks
WSAStartupmust succeed before any other Winsock call excepthtonl,htons,ntohl,ntohs, andWSAGetLastError.
bind
(namelen name s -- result) Associates a socket with a local address.Inputs
namelen:Int32size in bytes of the address atname.name:Natxaddress of a borrowed read-only local socket-address record.s:Natxsocket handle.
Outputs
result:Int320 on success,-1on failure.
closesocket
(s -- result) Closes a socket.Inputs
s:Natxsocket handle to close.
Outputs
result:Int320 on success,-1on failure.
connect
(nameLen name s -- result) Connects a socket to a peer address.Inputs
nameLen:Int32size in bytes of the address atname.name:sockaddrRefmutable borrowed peer socket address, which the call does not modify.s:Natxsocket handle.
Outputs
result:Int320 on success,-1on failure.
getaddrinfo
(ppResult pHints pServiceName pNodeName -- result) Resolves a node and service into an address list.Inputs
ppResult:Natxaddress passed as an integer to writable storage that receives the address of the first result record; view that address withaddrinfo addressToReferenceand pass the reference tofreeaddrinfo.pHints:addrinfoCrefborrowed address-resolution hints, whoseai_addrlen,ai_canonname,ai_addr, andai_nextmust be0nx.pServiceName:Natxaddress of a zero-terminated byte string naming the service, or0nxfor none.pNodeName:Natxaddress of a zero-terminated byte string naming the node, or0nxwhenpServiceNameis provided.
Outputs
result:Int320 on success, a nonzero error code on failure.
htonl
(hostlong -- result) Converts a 32-bit value from host byte order to network byte order.Inputs
hostlong:Nat32host-order 32-bit value.
Outputs
result:Nat32network-order 32-bit value.
htons
(hostshort -- result) Converts a 16-bit value from host byte order to network byte order.Inputs
hostshort:Nat16host-order 16-bit value, typically a port.
Outputs
result:Nat16network-order 16-bit value.
ioctlsocket
(argp cmd s -- result) Controls socket I/O mode.Inputs
argp:Natxaddress of caller-owned writable control-argument storage.cmd:Int32socket-control command.s:Natxsocket handle.
Outputs
result:Int320 on success,-1on failure.
listen
(backlog s -- result) Places a socket in listening mode.Inputs
Outputs
result:Int320 on success,-1on failure.
ntohl
(netlong -- result) Converts a 32-bit value from network byte order to host byte order.Inputs
netlong:Nat32network-order 32-bit value.
Outputs
result:Nat32host-order 32-bit value.
ntohs
(netshort -- result) Converts a 16-bit value from network byte order to host byte order.Inputs
netshort:Nat16network-order 16-bit value.
Outputs
result:Nat16host-order 16-bit value.
recv
(flags len buf s -- result) Receives bytes from a socket.Inputs
flags:Int32receive flags.len:Int32maximum number of bytes to receive.buf:Natxaddress of caller-owned writable receive storage.s:Natxsocket handle.
Outputs
result:Int32number of bytes received, or-1on failure (0marks orderly peer shutdown for a stream socket).
select
(timeout exceptfds writefds readfds ndfs -- result) Tests descriptor sets for socket readiness.Inputs
timeout:timevalReftimeout interval in seconds and microseconds.exceptfds:fd_setRefcaller-owned exception-interest set that the call updates.writefds:fd_setRefcaller-owned write-interest set that the call updates.readfds:fd_setRefcaller-owned read-interest set that the call updates.ndfs:Int32value ignored on Windows.
Outputs
result:Int32number of ready sockets, 0 on timeout, or-1on failure.
send
(flags len buf s -- result) Sends bytes through a socket.Inputs
flags:Int32send flags.len:Int32number of bytes to send.buf:Natxaddress of caller-owned bytes to send.s:Natxsocket handle.
Outputs
result:Int32number of bytes sent, or-1on failure.
setsockopt
(optlen optval optname level s -- result) Sets one socket option.Inputs
optlen:Int32option-value length in bytes.optval:Natxaddress of the option value.optname:Int32option identifier.level:Int32option level.s:Natxsocket handle.
Outputs
result:Int320 on success,-1on failure.
Notes
- After a failure indication,
WSAGetLastErrorprovides the Winsock error code;GetAddrInfoExCancel,GetAddrInfoExW,WSAStartup, andgetaddrinforeturn error codes directly. WSA_IO_PENDINGfromWSAGetLastErrormeans that the overlapped request was accepted for later completion.- Obtain a pending socket operation's final result through its completion notification or
WSAGetOverlappedResultbefore reusing itsOVERLAPPEDstorage. - Keep every byte buffer referenced by a pending
WSARecvorWSASendcall valid at a fixed address until completion. - For completion-port notification of
WSAIoctl,WSARecv, orWSASend, pass aNILcompletion routine.
Examples
Example: constants of ws2_32
AF_INET is 2, SOCK_STREAM 1, INVALID_SOCKET the largest Natx, WSAEWOULDBLOCK 10035, and SD_BOTH 2.
"control" use
"windows/ws2_32" use
{} () {} [
AF_INET printStack _:;
SOCK_STREAM printStack _:;
INVALID_SOCKET printStack _:;
WSAEWOULDBLOCK printStack _:;
SD_BOTH printStack _:;
] "main" exportFunction
Expected Output During Compilation
2
1
18446744073709551615nx
10035
2
Example: WSAStartup, WSARecv, and socket signatures
Printing @WSAStartup, @WSARecv, and @socket during compilation shows their imported signatures.
"control" use
"windows/ws2_32" use
{} Int32 {} [
@WSAStartup printStack _:;
@WSARecv printStack _:;
@socket printStack _:;
0
] "main" exportFunction
Expected Output During Compilation
{wVersionRequested: Nat16; lpWSAData: {wVersion: Nat16; wHighVersion: Nat16; iMaxSockets: Nat16; iMaxUdpDg: Nat16; lpVendorInfo: Nat8 Ref; szDescription: Nat8 257 array; szSystemStatus: Nat8 129 array;} Ref;} Int32 {convention: "";} codeRef
{s: Natx; lpBuffers: {len: Nat32; buf: Natx;} Ref; dwBufferCount: Nat32; lpNumberOfBytesRecvd: Nat32 Ref; lpFlags: Nat32 Ref; lpOverlapped: {Internal: Natx; InternalHigh: Natx; DUMMYUNIONNAME: Nat64; hEvent: Natx;} Ref; lpCompletionRoutine: {dwError: Nat32; cbTransferred: Nat32; lpOverlapped: {Internal: Natx; InternalHigh: Natx; DUMMYUNIONNAME: Nat64; hEvent: Natx;} Ref; dwFlags: Nat32;} () {convention: "";} codeRef;} Int32 {convention: "";} codeRef
{af: Int32; type: Int32; protocol: Int32;} Natx {convention: "";} codeRef
See also
- windows/dispatcher: Windows completion-port dispatcher and callback posting helpers.
- windows/kernel32: Kernel32 declarations for synchronization, process, thread, file, and timing helpers.
- linux/socket · macos/socket: Linux and macOS socket declarations, constants, address schemas, and imported functions.
- sync/sync: Cross-platform scheduling, sleep, time, IPv4 formatting, and TCP helpers.
- sync/TcpAcceptor: Listening TCP acceptor with address reporting and accepted connection creation.
- sync/TcpConnection: Connected TCP stream with buffered read, string read, write, and shutdown operations.