diff options
Diffstat (limited to 'rb/src/IceRuby/Endpoint.cpp')
-rw-r--r-- | rb/src/IceRuby/Endpoint.cpp | 21 |
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); |