kopia lustrzana https://github.com/micropython/micropython-lib
socket: accept(): Fully decode peer address using inet_ntop().
rodzic
f1533338ea
commit
13b56c262a
|
@ -39,8 +39,7 @@ class socket(_socket.socket):
|
|||
def accept(self):
|
||||
s, addr = super().accept()
|
||||
addr = _socket.sockaddr(addr)
|
||||
# Assumes IPv4
|
||||
return (s, addr[1:3])
|
||||
return (s, (_socket.inet_ntop(addr[0], addr[1]), addr[2]))
|
||||
|
||||
def bind(self, addr):
|
||||
return super().bind(_resolve_addr(addr))
|
||||
|
|
Ładowanie…
Reference in New Issue