Search found 2 matches

by Thorin
Thu May 06, 2021 10:19 pm
Forum: General Discussion and Questions
Topic: How to get client address as a server using sockets
Replies: 2
Views: 1573

Re: How to get client address as a server using sockets

When purely priniting the addr you get this: bytearray(b'\x02\x00\xccT6\xa5\xef\xaa\x00\x00\x00\x00\x00\x00\x00\x00'); Which if each induviual item would be converted to integers read like this [2,0,218,74,160,20,99,46,0,0,0,0,0,0,0,0] (not from the same client). Also if I do socket.inet_ntop(socket...
by Thorin
Thu May 06, 2021 4:01 pm
Forum: General Discussion and Questions
Topic: How to get client address as a server using sockets
Replies: 2
Views: 1573

How to get client address as a server using sockets

A small background: I'm developing a minimal resource server that is meant to respond to simple pings and send some JSON messages and so on. I want to be able to track the IP address of every client that has pinged the server, but I can't find any solution to this on the internet except for one pers...