htonl function winsock

Win32Result<int> htonl(
  1. int hostlong
)

Converts a u_long from host to TCP/IP network byte order (which is big-endian).

To learn more, see learn.microsoft.com/windows/win32/api/winsock/nf-winsock-htonl.

Implementation

Win32Result<int> htonl(int hostlong) {
  final result_ = htonl_Wrapper(hostlong);
  return .new(value: result_.value.u32, error: result_.error);
}