Changed  self.host to self._host in get_socket().