diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-10-12 10:45:43 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-10-12 10:45:43 +0200 |
commit | f7ec04896f054614a1f08a66c4f7cf9fe71d8f6a (patch) | |
tree | 6d56b2613e3b5f15e7529dcc8afef495b9e566c7 /cpp/src/Ice/UdpTransceiver.cpp | |
parent | Bug 4222 - cannot install to network drive (diff) | |
download | ice-f7ec04896f054614a1f08a66c4f7cf9fe71d8f6a.tar.bz2 ice-f7ec04896f054614a1f08a66c4f7cf9fe71d8f6a.tar.xz ice-f7ec04896f054614a1f08a66c4f7cf9fe71d8f6a.zip |
Added ConnectionInfo/EndpointInfo, bug 4280 & 3964
Diffstat (limited to 'cpp/src/Ice/UdpTransceiver.cpp')
-rw-r--r-- | cpp/src/Ice/UdpTransceiver.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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 <Ice/UdpTransceiver.h> +#include <Ice/Connection.h> #include <Ice/Instance.h> #include <Ice/TraceLevels.h> #include <Ice/LoggerUtil.h> @@ -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) { |