socket.htonl()

socket.htonl(integer) → integer

Convert a 32-bit integer from host to network byte order.