Name
getpeername
Synopsis
s
.getpeername( )
Returns a pair
(
ipaddr
,port
)
,
giving the IP address and port number of the counterpart.
s
must be connected, either because you
called s
.connect
or
because s
was generated by another
socket’s accept
method.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.