python socket limit one connection per mac address code example Example: socket hostname socket.gethostbyname(socket.gethostname())