summaryrefslogtreecommitdiff
path: root/rb/src/IceRuby/Endpoint.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2015-02-17 15:49:00 -0330
committerDwayne Boone <dwayne@zeroc.com>2015-02-17 15:49:00 -0330
commitbfb35f122ecb429cf9d869f0331b0899f7b18fe8 (patch)
treef72951c29ecd08d9f34b0c0da47e3056959444ad /rb/src/IceRuby/Endpoint.cpp
parentFixed (ICE-5740) - IcePatch2 has issues with 'large' files. (diff)
downloadice-bfb35f122ecb429cf9d869f0331b0899f7b18fe8.tar.bz2
ice-bfb35f122ecb429cf9d869f0331b0899f7b18fe8.tar.xz
ice-bfb35f122ecb429cf9d869f0331b0899f7b18fe8.zip
ICE-6313 Add Python/Ruby/PHP support for WSEndpointInfo / WSConnectionInfo
Diffstat (limited to 'rb/src/IceRuby/Endpoint.cpp')
-rw-r--r--rb/src/IceRuby/Endpoint.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/rb/src/IceRuby/Endpoint.cpp b/rb/src/IceRuby/Endpoint.cpp
index e2a31f0242e..c44585c5db8 100644
--- a/rb/src/IceRuby/Endpoint.cpp
+++ b/rb/src/IceRuby/Endpoint.cpp
@@ -20,6 +20,7 @@ static VALUE _endpointInfoClass;
static VALUE _ipEndpointInfoClass;
static VALUE _tcpEndpointInfoClass;
static VALUE _udpEndpointInfoClass;
+static VALUE _wsEndpointInfoClass;
static VALUE _opaqueEndpointInfoClass;
// **********************************************************************
@@ -149,6 +150,16 @@ IceRuby::createEndpointInfo(const Ice::EndpointInfoPtr& p)
rb_ivar_set(info, rb_intern("@mcastInterface"), createString(udp->mcastInterface));
rb_ivar_set(info, rb_intern("@mcastTtl"), INT2FIX(udp->mcastTtl));
}
+ else if(Ice::WSEndpointInfoPtr::dynamicCast(p))
+ {
+ info = Data_Wrap_Struct(_wsEndpointInfoClass, 0, IceRuby_EndpointInfo_free, new Ice::EndpointInfoPtr(p));
+
+ Ice::WSEndpointInfoPtr ws = Ice::WSEndpointInfoPtr::dynamicCast(p);
+ rb_ivar_set(info, rb_intern("@host"), createString(ws->host));
+ rb_ivar_set(info, rb_intern("@port"), INT2FIX(ws->port));
+ rb_ivar_set(info, rb_intern("@sourceAddress"), createString(ws->sourceAddress));
+ rb_ivar_set(info, rb_intern("@resource"), createString(ws->resource));
+ }
else if(Ice::OpaqueEndpointInfoPtr::dynamicCast(p))
{
info = Data_Wrap_Struct(_opaqueEndpointInfoClass, 0, IceRuby_EndpointInfo_free, new Ice::EndpointInfoPtr(p));
@@ -293,6 +304,16 @@ IceRuby::initEndpoint(VALUE iceModule)
rb_define_attr(_udpEndpointInfoClass, "mcastTtl", 1, 0);
//
+ // WSEndpointInfo
+ //
+ _wsEndpointInfoClass = rb_define_class_under(iceModule, "WSEndpointInfo", _ipEndpointInfoClass);
+
+ //
+ // Instance members.
+ //
+ rb_define_attr(_wsEndpointInfoClass, "resource", 1, 0);
+
+ //
// OpaqueEndpointInfo
//
_opaqueEndpointInfoClass = rb_define_class_under(iceModule, "OpaqueEndpointInfo", _endpointInfoClass);