📅  最后修改于: 2022-03-11 14:46:12.237000             🧑  作者: Mango
# If you are connected to the client socket you can get its address
client_socket.getpeername()
# Expected return value is a Tuple (ip, port)
# You can also get your own socket address
client_socket.getsockname()
# Expected return value is a Tuple (ip, port)