From f7ec04896f054614a1f08a66c4f7cf9fe71d8f6a Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Mon, 12 Oct 2009 10:45:43 +0200 Subject: Added ConnectionInfo/EndpointInfo, bug 4280 & 3964 --- cpp/src/Ice/UdpTransceiver.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cpp/src/Ice/UdpTransceiver.cpp') diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp index 8196391e00b..fbf00a1048a 100644 --- a/cpp/src/Ice/UdpTransceiver.cpp +++ b/cpp/src/Ice/UdpTransceiver.cpp @@ -16,6 +16,7 @@ #endif #include +#include #include #include #include @@ -451,6 +452,16 @@ IceInternal::UdpTransceiver::toString() const } } +Ice::ConnectionInfoPtr +IceInternal::UdpTransceiver::getInfo() const +{ + assert(_fd != INVALID_SOCKET); + Ice::UdpConnectionInfoPtr info = new Ice::UdpConnectionInfo(); + fdToAddressAndPort(_fd, info->localAddress, info->localPort, info->remoteAddress, info->remotePort); + addrToAddressAndPort(_mcastAddr, info->mcastAddress, info->mcastPort); + return info; +} + void IceInternal::UdpTransceiver::checkSendSize(const Buffer& buf, size_t messageSizeMax) { -- cgit v1.2.3