You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/02/18 00:11:24 UTC

[GitHub] [geode-native] gaussianrecurrence commented on a change in pull request #815: GEODE-9327: Remove ACE networking code references

gaussianrecurrence commented on a change in pull request #815:
URL: https://github.com/apache/geode-native/pull/815#discussion_r809573438



##########
File path: cppcache/src/ClientProxyMembershipID.cpp
##########
@@ -77,21 +77,13 @@ ClientProxyMembershipID::ClientProxyMembershipID(
 }
 
 void ClientProxyMembershipID::initHostAddressVector(
-    const ACE_INET_Addr& address) {
-  if (address.get_type() == AF_INET6) {
-    const auto socketAddress6 =
-        static_cast<const struct sockaddr_in6*>(address.get_addr());
-    auto socketAddress =
-        reinterpret_cast<const uint8_t*>(&socketAddress6->sin6_addr);
-    auto length = sizeof(socketAddress6->sin6_addr);
-    m_hostAddr.assign(socketAddress, socketAddress + length);
+    const boost::asio::ip::address& address) {
+  if (address.is_v6()) {
+    auto bytes = address.to_v6().to_bytes();
+    m_hostAddr.assign(bytes.begin(), bytes.end());

Review comment:
       Good point!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org