summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/TcpEndpointI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2009-10-12 10:45:43 +0200
committerBenoit Foucher <benoit@zeroc.com>2009-10-12 10:45:43 +0200
commitf7ec04896f054614a1f08a66c4f7cf9fe71d8f6a (patch)
tree6d56b2613e3b5f15e7529dcc8afef495b9e566c7 /cpp/src/Ice/TcpEndpointI.cpp
parentBug 4222 - cannot install to network drive (diff)
downloadice-f7ec04896f054614a1f08a66c4f7cf9fe71d8f6a.tar.bz2
ice-f7ec04896f054614a1f08a66c4f7cf9fe71d8f6a.tar.xz
ice-f7ec04896f054614a1f08a66c4f7cf9fe71d8f6a.zip
Added ConnectionInfo/EndpointInfo, bug 4280 & 3964
Diffstat (limited to 'cpp/src/Ice/TcpEndpointI.cpp')
-rw-r--r--cpp/src/Ice/TcpEndpointI.cpp46
1 files changed, 34 insertions, 12 deletions
diff --git a/cpp/src/Ice/TcpEndpointI.cpp b/cpp/src/Ice/TcpEndpointI.cpp
index 95c666a0580..9d8c761231f 100644
--- a/cpp/src/Ice/TcpEndpointI.cpp
+++ b/cpp/src/Ice/TcpEndpointI.cpp
@@ -226,6 +226,40 @@ IceInternal::TcpEndpointI::toString() const
return s.str();
}
+EndpointInfoPtr
+IceInternal::TcpEndpointI::getInfo() const
+{
+ class InfoI : public Ice::TcpEndpointInfo
+ {
+ public:
+
+ InfoI(Ice::Int to, bool comp, const string& host, Ice::Int port) :
+ TcpEndpointInfo(to, comp, host, port)
+ {
+ }
+
+ virtual Ice::Short
+ type() const
+ {
+ return TcpEndpointType;
+ }
+
+ virtual bool
+ datagram() const
+ {
+ return false;
+ }
+
+ virtual bool
+ secure() const
+ {
+ return false;
+ }
+ };
+
+ return new InfoI(_timeout, _compress, _host, _port);
+}
+
Short
IceInternal::TcpEndpointI::type() const
{
@@ -295,18 +329,6 @@ IceInternal::TcpEndpointI::secure() const
return false;
}
-string
-IceInternal::TcpEndpointI::host() const
-{
- return _host;
-}
-
-Ice::Int
-IceInternal::TcpEndpointI::port() const
-{
- return _port;
-}
-
TransceiverPtr
IceInternal::TcpEndpointI::transceiver(EndpointIPtr& endp) const
{