You could use something like `127.1.2.3` here. The entire `127.x.x.x` space is reserved for localhost but `127.1.2.3:port` is distinct from `127.0.0.1:port`. Thus using such an ip further reduces the chance of collision and it eliminates the potential problem when the DNS lookup for `localhost` fails (because of a misconfigured hosts file for example).