summaryrefslogtreecommitdiff
path: root/csharp/test/Ice/info/TestI.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/test/Ice/info/TestI.cs')
-rw-r--r--csharp/test/Ice/info/TestI.cs37
1 files changed, 26 insertions, 11 deletions
diff --git a/csharp/test/Ice/info/TestI.cs b/csharp/test/Ice/info/TestI.cs
index fdc7547b73a..69b22641bba 100644
--- a/csharp/test/Ice/info/TestI.cs
+++ b/csharp/test/Ice/info/TestI.cs
@@ -12,6 +12,30 @@ using System.Collections.Generic;
public class TestI : TestIntfDisp_
{
+ private static Ice.IPEndpointInfo getIPEndpointInfo(Ice.EndpointInfo info)
+ {
+ for(; info != null; info = info.underlying)
+ {
+ if(info is Ice.IPEndpointInfo)
+ {
+ return info as Ice.IPEndpointInfo;
+ }
+ }
+ return null;
+ }
+
+ private static Ice.IPConnectionInfo getIPConnectionInfo(Ice.ConnectionInfo info)
+ {
+ for(; info != null; info = info.underlying)
+ {
+ if(info is Ice.IPConnectionInfo)
+ {
+ return info as Ice.IPConnectionInfo;
+ }
+ }
+ return null;
+ }
+
override public void shutdown(Ice.Current current)
{
current.adapter.getCommunicator().shutdown();
@@ -27,7 +51,7 @@ public class TestI : TestIntfDisp_
ctx["secure"] = info.datagram() ? "true" : "false";
ctx["type"] = info.type().ToString();
- Ice.IPEndpointInfo ipinfo = (Ice.IPEndpointInfo)info;
+ Ice.IPEndpointInfo ipinfo = getIPEndpointInfo(info);
ctx["host"] = ipinfo.host;
ctx["port"] = ipinfo.port.ToString();
@@ -48,7 +72,7 @@ public class TestI : TestIntfDisp_
ctx["adapterName"] = info.adapterName;
ctx["incoming"] = info.incoming ? "true" : "false";
- Ice.IPConnectionInfo ipinfo = (Ice.IPConnectionInfo)info;
+ Ice.IPConnectionInfo ipinfo = getIPConnectionInfo(info);
ctx["localAddress"] = ipinfo.localAddress;
ctx["localPort"] = ipinfo.localPort.ToString();
ctx["remoteAddress"] = ipinfo.remoteAddress;
@@ -63,15 +87,6 @@ public class TestI : TestIntfDisp_
}
}
- if(info is IceSSL.WSSConnectionInfo)
- {
- IceSSL.WSSConnectionInfo wssinfo = (IceSSL.WSSConnectionInfo)info;
- foreach(KeyValuePair<string, string> e in wssinfo.headers)
- {
- ctx["ws." + e.Key] = e.Value;
- }
- }
-
return ctx;
}
}