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 person asking the exact question with no answer.
To connect to a client I approximately do this:
Code: Select all
serverSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serverSocket.bind(addr_info[-1]) serverSocket.listen(1) (conn, addr) = self.serverSocket.accept()
Github repo: https://github.com/the-lockedcraft-lega ... ntomServer