socket: accept(): Fully decode peer address using inet_ntop().

pull/65/merge
Paul Sokolovsky 2016-01-11 15:04:45 +02:00
rodzic f1533338ea
commit 13b56c262a
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -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))