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

C# IceInternal.Instance类代码示例

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

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



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

示例1: ObjectAdapterFactory

 //
 // Only for use by Instance.
 //
 internal ObjectAdapterFactory(Instance instance, Ice.Communicator communicator)
 {
     instance_ = instance;
     _communicator = communicator;
     _adapterNamesInUse = new HashSet<string>();
     _adapters = new List<Ice.ObjectAdapterI>();
 }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:10,代码来源:ObjectAdapterFactory.cs


示例2: ConnectionMonitor

 //
 // Only for use by Instance.
 //
 internal ConnectionMonitor(Instance instance, int interval)
 {
     instance_ = instance;
     _interval = interval;
     _scheduledInterval = 0;
     _connections = new HashSet<Ice.ConnectionI>();
 }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:10,代码来源:ConnectionMonitor.cs


示例3: TcpEndpointI

 public TcpEndpointI(Instance instance, string ho, int po, int ti, string conId, bool co) : base(conId)
 {
     _instance = instance;
     _host = ho;
     _port = po;
     _timeout = ti;
     _compress = co;
     calcHashValue();
 }
开发者ID:2008hatake,项目名称:zeroc-ice,代码行数:9,代码来源:TcpEndpointI.cs


示例4: ProtocolInstance

 public ProtocolInstance(Instance instance, short type, string protocol)
 {
     instance_ = instance;
     traceLevel_ = instance_.traceLevels().network;
     traceCategory_ = instance_.traceLevels().networkCat;
     logger_ = instance_.initializationData().logger;
     properties_ = instance_.initializationData().properties;
     type_ = type;
     protocol_ = protocol;
 }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:10,代码来源:ProtocolInstance.cs


示例5: FixedReference

 public FixedReference(Instance instance,
                       Ice.Communicator communicator,
                       Ice.Identity identity,
                       string facet,
                       Reference.Mode mode,
                       bool secure,
                       Ice.ConnectionI connection)
     : base(instance, communicator, identity, facet, mode, secure)
 {
     _fixedConnection = connection;
 }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:11,代码来源:Reference.cs


示例6: ProtocolInstance

 public ProtocolInstance(Ice.Communicator communicator, short type, string protocol, bool secure)
 {
     instance_ = Util.getInstance(communicator);
     traceLevel_ = instance_.traceLevels().network;
     traceCategory_ = instance_.traceLevels().networkCat;
     logger_ = instance_.initializationData().logger;
     properties_ = instance_.initializationData().properties;
     type_ = type;
     protocol_ = protocol;
     secure_ = secure;
 }
开发者ID:externl,项目名称:ice,代码行数:11,代码来源:ProtocolInstance.cs


示例7: UdpEndpointI

 public UdpEndpointI(Instance instance, string ho, int po, string mif, int mttl, bool conn, string conId, 
                     bool co) : base(conId)
 {
     instance_ = instance;
     _host = ho;
     _port = po;
     _mcastInterface = mif;
     _mcastTtl = mttl;
     _connect = conn;
     connectionId_ = conId;
     _compress = co;
     calcHashValue();
 }
开发者ID:sbesson,项目名称:zeroc-ice,代码行数:13,代码来源:UdpEndpointI.cs


示例8: TcpConnector

        //
        // Only for use by TcpEndpoint
        //
        internal TcpConnector(Instance instance, IPEndPoint addr, int timeout, string connectionId)
        {
            _instance = instance;
            _traceLevels = instance.traceLevels();
            _logger = instance.initializationData().logger;
            _addr = addr;
            _timeout = timeout;
            _connectionId = connectionId;

            _hashCode = _addr.GetHashCode();
            _hashCode = 5 * _hashCode + _timeout;
            _hashCode = 5 * _hashCode + _connectionId.GetHashCode();
        }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:16,代码来源:TcpConnector.cs


示例9: get

 static public InvocationObserver get(Instance instance, string op)
 {
     CommunicatorObserver obsv = instance.initializationData().observer;
     if(obsv != null)
     {
         InvocationObserver observer = obsv.getInvocationObserver(null, op, _emptyContext);
         if(observer != null)
         {
             observer.attach();
         }
         return observer;
     }
     return null;
 }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:14,代码来源:ObserverHelper.cs


示例10: UdpConnector

        //
        // Only for use by TcpEndpoint
        //
        internal UdpConnector(Instance instance, EndPoint addr, string mcastInterface, int mcastTtl, string connectionId)
        {
            instance_ = instance;
            _addr = addr;
            _mcastInterface = mcastInterface;
            _mcastTtl = mcastTtl;
            _connectionId = connectionId;

            _hashCode = 5381;
            IceInternal.HashUtil.hashAdd(ref _hashCode, _addr);
            IceInternal.HashUtil.hashAdd(ref _hashCode, _mcastInterface);
            IceInternal.HashUtil.hashAdd(ref _hashCode, _mcastTtl);
            IceInternal.HashUtil.hashAdd(ref _hashCode, _connectionId);
        }
开发者ID:2008hatake,项目名称:zeroc-ice,代码行数:17,代码来源:UdpConnector.cs


示例11: TcpConnector

        //
        // Only for use by TcpEndpoint
        //
        internal TcpConnector(Instance instance, EndPoint addr, NetworkProxy proxy, int timeout, string connectionId)
        {
            _instance = instance;
            _traceLevels = instance.traceLevels();
            _logger = instance.initializationData().logger;
            _addr = addr;
            _proxy = proxy;
            _timeout = timeout;
            _connectionId = connectionId;

            _hashCode = 5381;
            IceInternal.HashUtil.hashAdd(ref _hashCode, _addr);
            IceInternal.HashUtil.hashAdd(ref _hashCode, _timeout);
            IceInternal.HashUtil.hashAdd(ref _hashCode, _connectionId);
        }
开发者ID:2008hatake,项目名称:zeroc-ice,代码行数:18,代码来源:TcpConnector.cs


示例12: AsyncIOThread

        internal AsyncIOThread(Instance instance)
        {
            _instance = instance;

            _thread = new HelperThread(this);
            if(instance.initializationData().properties.getProperty("Ice.ThreadPriority").Length > 0)
            {
                ThreadPriority priority = IceInternal.Util.stringToThreadPriority(
                                           instance.initializationData().properties.getProperty("Ice.ThreadPriority"));
                _thread.Start(priority);
            }
            else
            {
                _thread.Start(ThreadPriority.Normal);
            }
        }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:16,代码来源:AsyncIOThread.cs


示例13: Incoming

        public Incoming(Instance instance, ResponseHandler handler, Ice.ConnectionI connection,
            Ice.ObjectAdapter adapter, bool response, byte compress, int requestId)
            : base(instance, handler, connection, adapter, response, compress, requestId)
        {
            //
            // Prepare the response if necessary.
            //
            if(response)
            {
                os_.writeBlob(IceInternal.Protocol.replyHdr);

                //
                // Add the request ID.
                //
                os_.writeInt(requestId);
            }
        }
开发者ID:,项目名称:,代码行数:17,代码来源:


示例14: TcpAcceptor

        internal TcpAcceptor(Instance instance, string host, int port)
        {
            instance_ = instance;
            _traceLevels = instance.traceLevels();
            _logger = instance.initializationData().logger;
            _backlog = instance.initializationData().properties.getPropertyAsIntWithDefault("Ice.TCP.Backlog", 511);

            try
            {
                _addr = Network.getAddressForServer(host, port, instance_.protocolSupport());
                _fd = Network.createSocket(false, _addr.AddressFamily);
                Network.setBlock(_fd, false);
            #if !COMPACT
                Network.setTcpBufSize(_fd, instance_.initializationData().properties, _logger);
            #endif
                if(AssemblyUtil.platform_ != AssemblyUtil.Platform.Windows)
                {
                    //
                    // Enable SO_REUSEADDR on Unix platforms to allow
                    // re-using the socket even if it's in the TIME_WAIT
                    // state. On Windows, this doesn't appear to be
                    // necessary and enabling SO_REUSEADDR would actually
                    // not be a good thing since it allows a second
                    // process to bind to an address even it's already
                    // bound by another process.
                    //
                    // TODO: using SO_EXCLUSIVEADDRUSE on Windows would
                    // probably be better but it's only supported by recent
                    // Windows versions (XP SP2, Windows Server 2003).
                    //
                    Network.setReuseAddress(_fd, true);
                }
                if(_traceLevels.network >= 2)
                {
                    string s = "attempting to bind to tcp socket " + Network.addrToString(_addr);
                    _logger.trace(_traceLevels.networkCat, s);
                }
                _addr = Network.doBind(_fd, _addr);
            }
            catch(System.Exception)
            {
                _fd = null;
                throw;
            }
        }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:45,代码来源:TcpAcceptor.cs


示例15: EndpointHostResolver

 internal EndpointHostResolver(Instance instance)
 {
     _instance = instance;
     _protocol = instance.protocolSupport();
     _preferIPv6 = instance.preferIPv6();
     _thread = new HelperThread(this);
     updateObserver();
     if(instance.initializationData().properties.getProperty("Ice.ThreadPriority").Length > 0)
     {
         ThreadPriority priority = IceInternal.Util.stringToThreadPriority(
             instance.initializationData().properties.getProperty("Ice.ThreadPriority"));
         _thread.Start(priority);
     }
     else
     {
         _thread.Start(ThreadPriority.Normal);
     }
 }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:18,代码来源:EndpointHostResolver.cs


示例16: UdpConnector

        //
        // Only for use by TcpEndpoint
        //
        internal UdpConnector(Instance instance, IPEndPoint addr, string mcastInterface, int mcastTtl,
                              byte protocolMajor, byte protocolMinor, byte encodingMajor, byte encodingMinor,
                              string connectionId)
        {
            instance_ = instance;
            _addr = addr;
            _mcastInterface = mcastInterface;
            _mcastTtl = mcastTtl;
            _protocolMajor = protocolMajor;
            _protocolMinor = protocolMinor;
            _encodingMajor = encodingMajor;
            _encodingMinor = encodingMinor;
            _connectionId = connectionId;

            _hashCode = _addr.GetHashCode();
            _hashCode = 5 * _hashCode + _mcastInterface.GetHashCode();
            _hashCode = 5 * _hashCode + _mcastTtl.GetHashCode();
            _hashCode = 5 * _hashCode + _connectionId.GetHashCode();
        }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:22,代码来源:UdpConnector.cs


示例17: IncomingBase

        protected internal IncomingBase(Instance instance, ResponseHandler handler, Ice.ConnectionI connection, 
                                        Ice.ObjectAdapter adapter, bool response, byte compress, int requestId)
        {
            instance_ = instance;
            responseHandler_ = handler;
            response_ = response;
            compress_ = compress;
            if(response_)
            {
                os_ = new BasicStream(instance, Ice.Util.currentProtocolEncoding);
            }

            current_ = new Ice.Current();
            current_.id = new Ice.Identity();
            current_.adapter = adapter;
            current_.con = connection;
            current_.requestId = requestId;

            cookie_ = null;
        }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:20,代码来源:Incoming.cs


示例18: ProxyFactory

        //
        // Only for use by Instance
        //
        internal ProxyFactory(Instance instance)
        {
            instance_ = instance;

            string[] arr = instance_.initializationData().properties.getPropertyAsList("Ice.RetryIntervals");

            if(arr.Length > 0)
            {
                _retryIntervals = new int[arr.Length];

                for (int i = 0; i < arr.Length; i++)
                {
                    int v;

                    try
                    {
                        v = System.Int32.Parse(arr[i], CultureInfo.InvariantCulture);
                    }
                    catch(System.FormatException)
                    {
                        v = 0;
                    }

                    //
                    // If -1 is the first value, no retry and wait intervals.
                    //
                    if(i == 0 && v == -1)
                    {
                        _retryIntervals = new int[0];
                        break;
                    }

                    _retryIntervals[i] = v > 0?v:0;
                }
            }
            else
            {
                _retryIntervals = new int[1];
                _retryIntervals[0] = 0;
            }
        }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:44,代码来源:ProxyFactory.cs


示例19: AsyncIOThread

        internal AsyncIOThread(Instance instance)
        {
            _instance = instance;

            _thread = new HelperThread(this);
            updateObserver();
#if !SILVERLIGHT
            if(instance.initializationData().properties.getProperty("Ice.ThreadPriority").Length > 0)
            {
                ThreadPriority priority = IceInternal.Util.stringToThreadPriority(
                                           instance.initializationData().properties.getProperty("Ice.ThreadPriority"));
                _thread.Start(priority);
            }
            else
            {
                _thread.Start(ThreadPriority.Normal);
            }
#else
            _thread.Start();
#endif
        }
开发者ID:joshmoore,项目名称:ice,代码行数:21,代码来源:AsyncIOThread.cs


示例20: BatchRequestQueue

        public BatchRequestQueue(Instance instance, bool datagram)
        {
            Ice.InitializationData initData = instance.initializationData();
            _interceptor = initData.batchRequestInterceptor;
            _batchStreamInUse = false;
            _batchRequestNum = 0;
            _batchStream = new BasicStream(instance, Ice.Util.currentProtocolEncoding);
            _batchStream.writeBlob(Protocol.requestBatchHdr);
            _batchMarker = _batchStream.size();
            _request = new BatchRequestI(this);

            _maxSize = instance.batchAutoFlushSize();
            if(_maxSize > 0 && datagram)
            {
                int udpSndSize = initData.properties.getPropertyAsIntWithDefault("Ice.UDP.SndSize",
                                                                                 65535 - _udpOverhead);
                if(udpSndSize < _maxSize)
                {
                    _maxSize = udpSndSize;
                }
            }
        }
开发者ID:joshmoore,项目名称:ice,代码行数:22,代码来源:BatchRequestQueue.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IceInternal.ProtocolInstance类代码示例发布时间:2022-05-26
下一篇:
C# IceInternal.BasicStream类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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