public Dictionary <string, string> getEndpointInfoAsContext(Ice.Current current) { Debug.Assert(current.Connection != null); Dictionary <string, string> ctx = new Dictionary <string, string>(); Ice.EndpointInfo info = current.Connection.getEndpoint().getInfo(); ctx["timeout"] = info.timeout.ToString(); ctx["compress"] = info.compress ? "true" : "false"; ctx["datagram"] = info.datagram() ? "true" : "false"; ctx["secure"] = info.datagram() ? "true" : "false"; ctx["type"] = info.type().ToString(); IPEndpointInfo?ipinfo = getIPEndpointInfo(info); Debug.Assert(ipinfo != null); ctx["host"] = ipinfo.host; ctx["port"] = ipinfo.port.ToString(); if (ipinfo is UDPEndpointInfo) { UDPEndpointInfo udp = (UDPEndpointInfo)ipinfo; ctx["mcastInterface"] = udp.mcastInterface; ctx["mcastTtl"] = udp.mcastTtl.ToString(); } return(ctx); }
public Dictionary<string, string> getEndpointInfoAsContext(Ice.Current c) { Dictionary<string, string> ctx = new Dictionary<string, string>(); Ice.EndpointInfo info = c.con.getEndpoint().getInfo(); ctx["timeout"] = info.timeout.ToString(); ctx["compress"] = info.compress ? "true" : "false"; ctx["datagram"] = info.datagram() ? "true" : "false"; ctx["secure"] = info.datagram() ? "true" : "false"; ctx["type"] = info.type().ToString(); Ice.IPEndpointInfo ipinfo = getIPEndpointInfo(info); ctx["host"] = ipinfo.host; ctx["port"] = ipinfo.port.ToString(); if (ipinfo is Ice.UDPEndpointInfo) { Ice.UDPEndpointInfo udp = (Ice.UDPEndpointInfo)ipinfo; ctx["mcastInterface"] = udp.mcastInterface; ctx["mcastTtl"] = udp.mcastTtl.ToString(); } return ctx; }