copySockaddr

private fnubyte[] copySockaddr(const(SocketAddress) * sa) pure nothrow

Copies raw sockaddr bytes into an owned buffer.

Uses the platform-specific storage size to capture variable-length address data (e.g. sockaddr_in6) without truncation.

Parameters

saPointer to the sockaddr to copy, or null.

Returns

An owned ubyte[] containing the copied bytes, or null.