Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python socket get client ip

# 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)
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #python #socket #client #ip
ADD COMMENT
Topic
Name
5+6 =