On this page
  1. socket.ntohl
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

socket.ntohl

Prev: socket.inet_pton | Up: socket | Next: socket.ntohs
Rel: socket.AddressFamily, socket.close, socket.create_connection, socket.create_server
Ref: docs.python.org — socket.ntohl
Tags: #public #python3 #stdlib #socket


Import

import socket
from socket import ntohl

Signature & Overview

socket.ntohl(integer, /)

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

Usage

import socket

assert socket.ntohl(socket.htonl(123456)) == 123456

Gotchas

REPL Inspect

from socket import ntohl
help(ntohl)

Linked from

Related notes