We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1cd533 commit a33fca9Copy full SHA for a33fca9
docs/library/usocket.rst
@@ -105,6 +105,22 @@ Functions
105
from an exception object). The use of negative values is a provisional
106
detail which may change in the future.
107
108
+.. function:: inet_ntop(af, bin_addr)
109
+
110
+ Convert a binary network address *bin_addr* of the given address family *af*
111
+ to a textual representation::
112
113
+ >>> usocket.inet_ntop(usocket.AF_INET, b"\x7f\0\0\1")
114
+ '127.0.0.1'
115
116
+.. function:: inet_pton(af, txt_addr)
117
118
+ Convert a textual network address *txt_addr* of the given address family *af*
119
+ to a binary representation::
120
121
+ >>> usocket.inet_pton(usocket.AF_INET, "1.2.3.4")
122
+ b'\x01\x02\x03\x04'
123
124
Constants
125
---------
126
0 commit comments