• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# EndpointI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中EndpointI的典型用法代码示例。如果您正苦于以下问题:C# EndpointI类的具体用法?C# EndpointI怎么用?C# EndpointI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EndpointI类属于命名空间,在下文中一共展示了EndpointI类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: WSEndpoint

        internal WSEndpoint(ProtocolInstance instance, EndpointI del, BasicStream s)
        {
            _instance = instance;
            _delegate = (IPEndpointI)del;

            _resource = s.readString();
        }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:7,代码来源:WSEndpoint.cs


示例2: create

        public Reference create(Ice.Identity ident, string facet, Reference tmpl, EndpointI[] endpoints)
        {
            if(ident.name.Length == 0 && ident.category.Length == 0)
            {
                return null;
            }

            return create(ident, facet, tmpl.getMode(), tmpl.getSecure(), endpoints, null, null);
        }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:9,代码来源:ReferenceFactory.cs


示例3: 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;
        }
开发者ID:2008hatake,项目名称:zeroc-ice,代码行数:56,代码来源:EndpointHostResolver.cs


示例4: destroy

 public void destroy()
 {
     lock(this)
     {
         _clientEndpoints = new EndpointI[0];
         _serverEndpoints = new EndpointI[0];
         _adapter = null;
         _identities.Clear();
     }
 }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:10,代码来源:RouterInfo.cs


示例5: read

    public IceInternal.EndpointI read(Ice.InputStream s)
    {
        short type = s.readShort();
        Debug.Assert(type == _factory.type());

        s.startEncapsulation();
        IceInternal.EndpointI endpoint = new EndpointI(_factory.read(s));
        s.endEncapsulation();
        return endpoint;
    }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:10,代码来源:EndpointFactory.cs


示例6: read

    public IceInternal.EndpointI read(IceInternal.BasicStream s)
    {
        short type = s.readShort();
        Debug.Assert(type == _factory.type());

        s.startReadEncaps();
        IceInternal.EndpointI endpoint = new EndpointI(_factory.read(s));
        s.endReadEncaps();
        return endpoint;
    }
开发者ID:joshmoore,项目名称:ice,代码行数:10,代码来源:EndpointFactory.cs


示例7: CompareTo

        public override int CompareTo(EndpointI obj)
        {
            if(!(obj is IPEndpointI))
            {
                return type() < obj.type() ? -1 : 1;
            }

            IPEndpointI p = (IPEndpointI)obj;
            if(this == p)
            {
                return 0;
            }

            int v = string.Compare(host_, p.host_, StringComparison.Ordinal);
            if(v != 0)
            {
                return v;
            }

            if(port_ < p.port_)
            {
                return -1;
            }
            else if(p.port_ < port_)
            {
                return 1;
            }

            int rc = string.Compare(Network.endpointAddressToString(sourceAddr_),
                                    Network.endpointAddressToString(p.sourceAddr_), StringComparison.Ordinal);
            if(rc != 0)
            {
                return rc;
            }

            return string.Compare(connectionId_, p.connectionId_, StringComparison.Ordinal);
        }
开发者ID:externl,项目名称:ice,代码行数:37,代码来源:IPEndpointI.cs


示例8: equivalent

        //
        // Check whether the endpoint is equivalent to another one.
        //
        public override bool equivalent(EndpointI endpoint)
        {
            if(!(endpoint is TcpEndpointI))
            {
                return false;
            }

            TcpEndpointI tcpEndpointI = (TcpEndpointI)endpoint;
            return tcpEndpointI._host.Equals(_host) && tcpEndpointI._port == _port;
        }
开发者ID:2008hatake,项目名称:zeroc-ice,代码行数:13,代码来源:TcpEndpointI.cs


示例9: acceptor

        //
        // Return an acceptor for this endpoint, or null if no acceptors
        // is available. In case an acceptor is created, this operation
        // also returns a new "effective" endpoint, which might differ
        // from this endpoint, for example, if a dynamic port number is
        // assigned.
        //
        public override Acceptor acceptor(ref EndpointI endpoint, string adapterName)
        {
#if SILVERLIGHT
            throw new Ice.FeatureNotSupportedException("server endpoint not supported for `" + ToString() + "'");
#else
            TcpAcceptor p = new TcpAcceptor(_instance, _host, _port);
            endpoint = new TcpEndpointI(_instance, _host, p.effectivePort(), _timeout, connectionId_, _compress);
            return p;
#endif
        }
开发者ID:2008hatake,项目名称:zeroc-ice,代码行数:17,代码来源:TcpEndpointI.cs


示例10: InfoI

 public InfoI(EndpointI e)
 {
     _endpoint = e;
 }
开发者ID:externl,项目名称:ice,代码行数:4,代码来源:WSEndpoint.cs


示例11: equivalent

 public override bool equivalent(EndpointI endpoint)
 {
     if(!(endpoint is IPEndpointI))
     {
         return false;
     }
     IPEndpointI ipEndpointI = (IPEndpointI)endpoint;
     return ipEndpointI.type() == type() && ipEndpointI.host_.Equals(host_) && ipEndpointI.port_ == port_ &&
         Network.addressEquals(ipEndpointI.sourceAddr_, sourceAddr_);
 }
开发者ID:joshmoore,项目名称:ice,代码行数:10,代码来源:IPEndpointI.cs


示例12: CompareTo

        //
        // Compare endpoints for sorting purposes
        //
        public override int CompareTo(EndpointI obj)
        {
            if(!(obj is OpaqueEndpointI))
            {
                return type() < obj.type() ? -1 : 1;
            }

            OpaqueEndpointI p = (OpaqueEndpointI)obj;
            if(this == p)
            {
                return 0;
            }

            if(_type < p._type)
            {
                return -1;
            }
            else if(p._type < _type)
            {
                return 1;
            }

            if(_rawEncoding.major < p._rawEncoding.major)
            {
                return -1;
            }
            else if(p._rawEncoding.major < _rawEncoding.major)
            {
                return 1;
            }

            if(_rawEncoding.minor < p._rawEncoding.minor)
            {
                return -1;
            }
            else if(p._rawEncoding.minor < _rawEncoding.minor)
            {
                return 1;
            }

            if(_rawBytes.Length < p._rawBytes.Length)
            {
                return -1;
            }
            else if(p._rawBytes.Length < _rawBytes.Length)
            {
                return 1;
            }
            for(int i = 0; i < _rawBytes.Length; i++)
            {
                if(_rawBytes[i] < p._rawBytes[i])
                {
                    return -1;
                }
                else if(p._rawBytes[i] < _rawBytes[i])
                {
                    return 1;
                }
            }

            return 0;
        }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:65,代码来源:OpaqueEndpointI.cs


示例13: acceptor

 //
 // Return an acceptor for this endpoint, or null if no acceptors
 // is available. In case an acceptor is created, this operation
 // also returns a new "effective" endpoint, which might differ
 // from this endpoint, for example, if a dynamic port number is
 // assigned.
 //
 public override Acceptor acceptor(ref EndpointI endpoint, string adapterName)
 {
     endpoint = null;
     return null;
 }
开发者ID:Radulfr,项目名称:zeroc-ice,代码行数:12,代码来源:OpaqueEndpointI.cs


示例14: Acceptor

 internal Acceptor(EndpointI endpoint, IceInternal.Acceptor acceptor)
 {
     _endpoint = endpoint;
     _acceptor = acceptor;
 }
开发者ID:joshmoore,项目名称:ice,代码行数:5,代码来源:Acceptor.cs


示例15: CompareTo

        public override int CompareTo(EndpointI obj)
        {
            if(!(obj is TcpEndpointI))
            {
                return type() < obj.type() ? -1 : 1;
            }

            TcpEndpointI p = (TcpEndpointI)obj;
            if(this == p)
            {
                return 0;
            }

            if(_timeout < p._timeout)
            {
                return -1;
            }
            else if(p._timeout < _timeout)
            {
                return 1;
            }

            if(!_compress && p._compress)
            {
                return -1;
            }
            else if(!p._compress && _compress)
            {
                return 1;
            }

            return base.CompareTo(p);
        }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:33,代码来源:TcpEndpointI.cs


示例16: CompareTo

        public override int CompareTo(EndpointI obj)
        {
            if(!(obj is EndpointI))
            {
                return type() < obj.type() ? -1 : 1;
            }

            WSEndpoint p = (WSEndpoint)obj;
            if(this == p)
            {
                return 0;
            }

            int v = string.Compare(_resource, p._resource, StringComparison.Ordinal);
            if(v != 0)
            {
                return v;
            }

            return _delegate.CompareTo(p._delegate);
        }
开发者ID:externl,项目名称:ice,代码行数:21,代码来源:WSEndpoint.cs


示例17: endpoint

 public WSEndpoint endpoint(EndpointI delEndp)
 {
     return new WSEndpoint(_instance, delEndp, _resource);
 }
开发者ID:externl,项目名称:ice,代码行数:4,代码来源:WSEndpoint.cs


示例18: WSEndpoint

 internal WSEndpoint(ProtocolInstance instance, EndpointI del, string res)
 {
     _instance = instance;
     _delegate = (IPEndpointI)del;
     _resource = res;
 }
开发者ID:externl,项目名称:ice,代码行数:6,代码来源:WSEndpoint.cs


示例19: CompareTo

        //
        // Compare endpoints for sorting purposes
        //
        public override int CompareTo(EndpointI obj)
        {
            if(!(obj is TcpEndpointI))
            {
                return type() < obj.type() ? -1 : 1;
            }

            TcpEndpointI p = (TcpEndpointI)obj;
            if(this == p)
            {
                return 0;
            }
            else
            {
                int r = base.CompareTo(p);
                if(r != 0)
                {
                    return r;
                }
            }

            if(_port < p._port)
            {
                return -1;
            }
            else if(p._port < _port)
            {
                return 1;
            }

            if(_timeout < p._timeout)
            {
                return -1;
            }
            else if(p._timeout < _timeout)
            {
                return 1;
            }

            if(!_compress && p._compress)
            {
                return -1;
            }
            else if(!p._compress && _compress)
            {
                return 1;
            }

            return string.Compare(_host, p._host, StringComparison.Ordinal);
        }
开发者ID:2008hatake,项目名称:zeroc-ice,代码行数:53,代码来源:TcpEndpointI.cs


示例20: acceptor

 public override IceInternal.Acceptor acceptor(ref IceInternal.EndpointI endpoint, string adapterName)
 {
     Acceptor p = new Acceptor(_endpoint.acceptor(ref endpoint, adapterName));
     endpoint = new EndpointI(endpoint);
     return p;
 }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:6,代码来源:EndpointI.cs



注:本文中的EndpointI类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Enemy类代码示例发布时间:2022-05-24
下一篇:
C# EndpointConfiguration类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap