get the host of a server code example Example: get hostname socket.gethostbyname(socket.gethostname())