getpeername function winsock
Retrieves the address of the peer to which a socket is connected.
To learn more, see learn.microsoft.com/windows/win32/api/winsock/nf-winsock-getpeername.
Implementation
Win32Result<int> getpeername(
SOCKET s,
Pointer<SOCKADDR> name,
Pointer<Int32> namelen,
) {
final result_ = getpeername_Wrapper(s, name, namelen);
return .new(value: result_.value.i32, error: result_.error);
}