Loading src/posix/tcp.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -261,9 +261,6 @@ void netplus::tcp::connect(socket *ssock){ void netplus::tcp::getAddress(std::string &addr){ if(!_SocketInfo) return; char buf[512]; addr = inet_ntop(((struct addrinfo*)_SocketInfo)->ai_family, Loading src/posix/udp.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -262,9 +262,10 @@ void netplus::udp::connect(socket *ssock){ void netplus::udp::getAddress(std::string &addr){ if(!_SocketInfo) return; char ipaddr[INET6_ADDRSTRLEN]; inet_ntop(((struct addrinfo*)_SocketInfo)->ai_family,((struct addrinfo*)_SocketInfo)->ai_addr, ipaddr, ((struct addrinfo*)_SocketInfo)->ai_addrlen); addr=ipaddr; char buf[512]; addr = inet_ntop(((struct addrinfo*)_SocketInfo)->ai_family, &((struct addrinfo*)_SocketInfo)->ai_addr->sa_data + sizeof(struct sockaddr_storage), buf, ((struct addrinfo*)_SocketInfo)->ai_addrlen ); } src/windows/tcp.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -239,7 +239,10 @@ void netplus::tcp::connect(socket *ssock){ void netplus::tcp::getAddress(std::string &addr){ char ipaddr[INET6_ADDRSTRLEN]; inet_ntop(AF_INET6, ((struct addrinfo*)_SocketInfo)->ai_addr, ipaddr, ((struct addrinfo*)_SocketInfo)->ai_addrlen); addr=ipaddr; char buf[512]; addr = inet_ntop(((struct addrinfo*)_SocketInfo)->ai_family, &((struct addrinfo*)_SocketInfo)->ai_addr->sa_data + sizeof(struct sockaddr_storage), buf, ((struct addrinfo*)_SocketInfo)->ai_addrlen ); } src/windows/udp.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -234,7 +234,10 @@ void netplus::udp::connect(socket* ssock) { void netplus::udp::getAddress(std::string& addr) { char ipaddr[INET6_ADDRSTRLEN]; inet_ntop(AF_INET6, ((struct addrinfo*)_SocketInfo)->ai_addr, ipaddr, ((struct addrinfo*)_SocketInfo)->ai_addrlen); addr = ipaddr; char buf[512]; addr = inet_ntop(((struct addrinfo*)_SocketInfo)->ai_family, &((struct addrinfo*)_SocketInfo)->ai_addr->sa_data + sizeof(struct sockaddr_storage), buf, ((struct addrinfo*)_SocketInfo)->ai_addrlen ); } Loading
src/posix/tcp.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -261,9 +261,6 @@ void netplus::tcp::connect(socket *ssock){ void netplus::tcp::getAddress(std::string &addr){ if(!_SocketInfo) return; char buf[512]; addr = inet_ntop(((struct addrinfo*)_SocketInfo)->ai_family, Loading
src/posix/udp.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -262,9 +262,10 @@ void netplus::udp::connect(socket *ssock){ void netplus::udp::getAddress(std::string &addr){ if(!_SocketInfo) return; char ipaddr[INET6_ADDRSTRLEN]; inet_ntop(((struct addrinfo*)_SocketInfo)->ai_family,((struct addrinfo*)_SocketInfo)->ai_addr, ipaddr, ((struct addrinfo*)_SocketInfo)->ai_addrlen); addr=ipaddr; char buf[512]; addr = inet_ntop(((struct addrinfo*)_SocketInfo)->ai_family, &((struct addrinfo*)_SocketInfo)->ai_addr->sa_data + sizeof(struct sockaddr_storage), buf, ((struct addrinfo*)_SocketInfo)->ai_addrlen ); }
src/windows/tcp.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -239,7 +239,10 @@ void netplus::tcp::connect(socket *ssock){ void netplus::tcp::getAddress(std::string &addr){ char ipaddr[INET6_ADDRSTRLEN]; inet_ntop(AF_INET6, ((struct addrinfo*)_SocketInfo)->ai_addr, ipaddr, ((struct addrinfo*)_SocketInfo)->ai_addrlen); addr=ipaddr; char buf[512]; addr = inet_ntop(((struct addrinfo*)_SocketInfo)->ai_family, &((struct addrinfo*)_SocketInfo)->ai_addr->sa_data + sizeof(struct sockaddr_storage), buf, ((struct addrinfo*)_SocketInfo)->ai_addrlen ); }
src/windows/udp.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -234,7 +234,10 @@ void netplus::udp::connect(socket* ssock) { void netplus::udp::getAddress(std::string& addr) { char ipaddr[INET6_ADDRSTRLEN]; inet_ntop(AF_INET6, ((struct addrinfo*)_SocketInfo)->ai_addr, ipaddr, ((struct addrinfo*)_SocketInfo)->ai_addrlen); addr = ipaddr; char buf[512]; addr = inet_ntop(((struct addrinfo*)_SocketInfo)->ai_family, &((struct addrinfo*)_SocketInfo)->ai_addr->sa_data + sizeof(struct sockaddr_storage), buf, ((struct addrinfo*)_SocketInfo)->ai_addrlen ); }