'The address to use when connecting to this server
When `ip` is set to a real ip address, the same value is used.
When `ip` refers to \'all interfaces\' (e.g. \'0.0.0.0\'),
clients connect via hostname by default.
Setting `connect_ip` explicitly overrides any default behavior.'

@property
def _connect_ip(self):

    if self.connect_ip:
        return self.connect_ip
    elif (self.ip in {'', '0.0.0.0'}):
        return socket.gethostname()
    else:
        return self.ip
