hostToNetwork32 static method

int hostToNetwork32(
  1. int value
)

Convert host to network byte order (if needed)

  • value: The 32-bit value to convert Returns the value in network byte order

Implementation

static int hostToNetwork32(int value) {
  return Endian.host == Endian.little ? swap32(value) : value;
}