+ struct addrinfo* result;
+ struct addrinfo hints;
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_INET6;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_NUMERICHOST;
+ if (!getaddrinfo(ip.c_str(), nullptr, &hints, &result)) {
+ struct sockaddr_in6* ipAddr = (struct sockaddr_in6*)result->ai_addr;
+ addr_.in6Addr_ = ipAddr->sin6_addr;
+ scope_ = ipAddr->sin6_scope_id;
+ freeaddrinfo(result);
+ } else {