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


C# IceInternal.protocol方法代码示例

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


在下文中一共展示了IceInternal.protocol方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ConnectionI

        internal ConnectionI(Communicator communicator, IceInternal.Instance instance,
                             IceInternal.ACMMonitor monitor, IceInternal.Transceiver transceiver,
                             IceInternal.Connector connector, IceInternal.EndpointI endpoint, ObjectAdapterI adapter)
        {
            _communicator = communicator;
            _instance = instance;
            _monitor = monitor;
            _transceiver = transceiver;
            _desc = transceiver.ToString();
            _type = transceiver.protocol();
            _connector = connector;
            _endpoint = endpoint;
            _adapter = adapter;
            InitializationData initData = instance.initializationData();
            _logger = initData.logger; // Cached for better performance.
            _traceLevels = instance.traceLevels(); // Cached for better performance.
            _timer = instance.timer();
            _writeTimeout = new TimeoutCallback(this);
            _writeTimeoutScheduled = false;
            _readTimeout = new TimeoutCallback(this);
            _readTimeoutScheduled = false;
            _warn = initData.properties.getPropertyAsInt("Ice.Warn.Connections") > 0;
            _warnUdp = initData.properties.getPropertyAsInt("Ice.Warn.Datagrams") > 0;
            _cacheBuffers = instance.cacheMessageBuffers() > 0;
            if(_monitor != null && _monitor.getACM().timeout > 0)
            {
                _acmLastActivity = IceInternal.Time.currentMonotonicTimeMillis();
            }
            else
            {
                _acmLastActivity = -1;
            }
            _nextRequestId = 1;
            _messageSizeMax = adapter != null ? adapter.messageSizeMax() : instance.messageSizeMax();
            _batchRequestQueue = new IceInternal.BatchRequestQueue(instance, _endpoint.datagram());
            _readStream = new IceInternal.BasicStream(instance, Util.currentProtocolEncoding);
            _readHeader = false;
            _readStreamPos = -1;
            _writeStream = new IceInternal.BasicStream(instance, Util.currentProtocolEncoding);
            _writeStreamPos = -1;
            _dispatchCount = 0;
            _state = StateNotInitialized;

            _compressionLevel = initData.properties.getPropertyAsIntWithDefault("Ice.Compression.Level", 1);
            if(_compressionLevel < 1)
            {
                _compressionLevel = 1;
            }
            else if(_compressionLevel > 9)
            {
                _compressionLevel = 9;
            }

            if(adapter != null)
            {
                _servantManager = adapter.getServantManager();
            }

            try
            {
                if(adapter != null)
                {
                    _threadPool = adapter.getThreadPool();
                }
                else
                {
                    _threadPool = instance.clientThreadPool();
                }
                _threadPool.initialize(this);
            }
            catch(LocalException)
            {
                throw;
            }
            catch(System.Exception ex)
            {
                throw new SyscallException(ex);
            }
        }
开发者ID:alexmnazarenko,项目名称:ice,代码行数:79,代码来源:ConnectionI.cs

示例2: clone

 public IceInternal.EndpointFactory clone(IceInternal.ProtocolInstance instance)
 {
     return new EndpointFactoryI(new Instance(_instance.engine(), instance.type(), instance.protocol()));
 }
开发者ID:externl,项目名称:ice,代码行数:4,代码来源:EndpointI.cs

示例3: clone

 public IceInternal.EndpointFactory clone(IceInternal.ProtocolInstance inst,
                                          IceInternal.EndpointFactory del)
 {
     Instance instance = new Instance(_instance.engine(), inst.type(), inst.protocol());
     return new EndpointFactoryI(instance, del != null ? del : _delegate.clone(instance, null));
 }
开发者ID:zhangwei5095,项目名称:ice,代码行数:6,代码来源:EndpointI.cs


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