GetAddrInfo function winsock

int GetAddrInfo(
  1. PCWSTR? pNodeName,
  2. PCWSTR? pServiceName,
  3. Pointer<ADDRINFO>? pHints,
  4. Pointer<Pointer<ADDRINFO>> ppResult,
)

Provides protocol-independent translation from a Unicode host name to an address.

To learn more, see learn.microsoft.com/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfow.

Implementation

@pragma('vm:prefer-inline')
int GetAddrInfo(
  PCWSTR? pNodeName,
  PCWSTR? pServiceName,
  Pointer<ADDRINFO>? pHints,
  Pointer<Pointer<ADDRINFO>> ppResult,
) => _GetAddrInfo(
  pNodeName ?? nullptr,
  pServiceName ?? nullptr,
  pHints ?? nullptr,
  ppResult,
);