本文整理汇总了C#中EndpointI.connectors方法的典型用法代码示例。如果您正苦于以下问题:C# EndpointI.connectors方法的具体用法?C# EndpointI.connectors怎么用?C# EndpointI.connectors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EndpointI
的用法示例。
在下文中一共展示了EndpointI.connectors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: resolve
public List<Connector> resolve(string host, int port, Ice.EndpointSelectionType selType, EndpointI endpoint)
{
//
// Try to get the addresses without DNS lookup. If this doesn't
// work, we retry with DNS lookup (and observer).
//
NetworkProxy networkProxy = _instance.networkProxy();
if(networkProxy == null)
{
List<EndPoint> addrs = Network.getAddresses(host, port, _protocol, selType, _preferIPv6, false);
if(addrs.Count > 0)
{
return endpoint.connectors(addrs, null);
}
}
Ice.Instrumentation.CommunicatorObserver obsv = _instance.getObserver();
Ice.Instrumentation.Observer observer = null;
if(obsv != null)
{
observer = obsv.getEndpointLookupObserver(endpoint);
if(observer != null)
{
observer.attach();
}
}
List<Connector> connectors = null;
try
{
if(networkProxy != null)
{
networkProxy = networkProxy.resolveHost();
}
connectors = endpoint.connectors(Network.getAddresses(host, port, _protocol, selType, _preferIPv6,
true),
networkProxy);
}
catch(Ice.LocalException ex)
{
if(observer != null)
{
observer.failed(ex.ice_name());
}
throw ex;
}
finally
{
if(observer != null)
{
observer.detach();
}
}
return connectors;
}