当前位置: 首页>>代码示例>>C#>>正文


C# EndpointI类代码示例

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


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


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