You are here : python_3socketsocketinet_aton

socket.inet_aton() - socket

Convert an IPv4 address from dotted-quad string format (for example,
‘123.45.67.89’) to 32-bit packed binary format, as a bytes object four characters in
length.  This is useful when conversing with a program that uses the standard C
library and needs objects of type struct in_addr, which is the C type
for the 32-bit packed binary this function returns.


Syntax

socket.inet_aton(ip_string)


Example


Output / Return Value


Limitations


Alternatives / See Also


Reference