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

C# IceInternal类代码示例

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

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



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

示例1: dispatch__

 dispatch__(IceInternal.Incoming inc, Current current)
 {
     try
     {
         DispatchStatus status = dispatch(inc);
         if(status != DispatchStatus.DispatchAsync)
         {
             //
             // Make sure 'inc' owns the connection etc.
             //
             inc.killAsync();
         }
         return status;
     }
     catch(ResponseSentException)
     {
         return DispatchStatus.DispatchAsync;
     }
     catch(System.Exception)
     {
         try
         {
             inc.killAsync();
             throw;
         }
         catch(ResponseSentException)
         {
             return DispatchStatus.DispatchAsync;
         }
     }
 }
开发者ID:Radulfr,项目名称:zeroc-ice,代码行数:31,代码来源:DispatchInterceptor.cs


示例2: EndpointI

 internal EndpointI(Instance instance, IceInternal.BasicStream s) :
     base(instance, s)
 {
     _instance = instance;
     _timeout = s.readInt();
     _compress = s.readBool();
 }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:7,代码来源:EndpointI.cs


示例3: initialize

        public int initialize(IceInternal.Buffer readBuffer, IceInternal.Buffer writeBuffer, ref bool hasMoreData)
        {
            int status = _stream.connect(readBuffer, writeBuffer, ref hasMoreData);
            if(status != IceInternal.SocketOperation.None)
            {
                return status;
            }

            _stream.setBlock(true); // SSL requires a blocking socket

            if(_sslStream == null)
            {
                NetworkStream ns = new NetworkStream(_stream.fd(), false);
                _sslStream = new SslStream(ns, false, new RemoteCertificateValidationCallback(validationCallback),
                                                      new LocalCertificateSelectionCallback(selectCertificate));
                return IceInternal.SocketOperation.Connect;
            }

            Debug.Assert(_sslStream.IsAuthenticated);
            _authenticated = true;
            _instance.verifyPeer((NativeConnectionInfo)getInfo(), _stream.fd(), _host);

            if(_instance.securityTraceLevel() >= 1)
            {
                _instance.traceStream(_sslStream, _stream.ToString());
            }
            return IceInternal.SocketOperation.None;
        }
开发者ID:joshmoore,项目名称:ice,代码行数:28,代码来源:TransceiverI.cs


示例4: CompareTo

    public override int CompareTo(IceInternal.EndpointI obj)
    {
        EndpointI p = null;

        try
        {
            p = (EndpointI)obj;
        }
        catch(System.InvalidCastException)
        {
            try
            {
                return type() < obj.type() ? -1 : 1;
            }
            catch(System.InvalidCastException)
            {
                Debug.Assert(false);
            }
        }

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

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


示例5: startAccept

        public bool startAccept(IceInternal.AsyncCallback callback, object state)
        {
            //
            // The plug-in may not be fully initialized.
            //
            if(!_instance.initialized())
            {
                Ice.PluginInitializationException ex = new Ice.PluginInitializationException();
                ex.reason = "IceSSL: plug-in is not initialized";
                throw ex;
            }

            try
            {
                _result = _fd.BeginAccept(delegate(IAsyncResult result)
                                          {
                                              if(!result.CompletedSynchronously)
                                              {
                                                  callback(result.AsyncState);
                                              }
                                          }, state);
                return _result.CompletedSynchronously;
            }
            catch(SocketException ex)
            {
                throw new Ice.SocketException(ex);
            }
        }
开发者ID:joshmoore,项目名称:ice,代码行数:28,代码来源:AcceptorI.cs


示例6: streamWrite

 public override void streamWrite(IceInternal.BasicStream s)
 {
     s.startWriteEncaps();
     s.writeShort(_endpoint.type());
     _endpoint.streamWrite(s);
     s.endWriteEncaps();
 }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:7,代码来源:EndpointI.cs


示例7: finishRead

    public void finishRead(IceInternal.Buffer buf)
    {
        _configuration.checkReadException();
        if(_buffered)
        {
            if(buf.b.hasRemaining())
            {
                _transceiver.finishRead(_readBuffer);

                int pos = _readBuffer.b.position();
                int requested = buf.b.remaining();
                int available = pos - _readBufferPos;
                if(available > 0)
                {
                    if(available >= requested)
                    {
                        available = requested;
                    }

                    byte[] arr = new byte[available];
                    _readBuffer.b.position(_readBufferPos);
                    _readBuffer.b.get(arr);
                    buf.b.put(arr);
                    _readBufferPos += available;
                    _readBuffer.b.position(pos);
                }
            }
        }
        else
        {
            _transceiver.finishRead(buf);
        }
    }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:33,代码来源:Transceiver.cs


示例8: collocDispatch__

 collocDispatch__(IceInternal.Direct request) 
 {
     //
     // Should only return DispatchOK or DispatchUserException
     //
     return dispatch(request);
 }
开发者ID:Radulfr,项目名称:zeroc-ice,代码行数:7,代码来源:DispatchInterceptor.cs


示例9: WSConnector

 internal WSConnector(ProtocolInstance instance, IceInternal.Connector del, string host, string resource)
 {
     _instance = instance;
     _delegate = del;
     _host = host;
     _resource = resource;
 }
开发者ID:zhangwei5095,项目名称:ice,代码行数:7,代码来源:WSConnector.cs


示例10: startRead

 public bool startRead(IceInternal.Buffer buf, IceInternal.AsyncCallback callback, object state)
 {
     if(_configuration.readReady())
     {
         _configuration.checkReadException(); // Only raise if we're configured to read now.
     }
     return _transceiver.startRead(buf, callback, state);
 }
开发者ID:Radulfr,项目名称:zeroc-ice,代码行数:8,代码来源:Transceiver.cs


示例11: 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


示例12: write

    public int write(IceInternal.Buffer buf)
    {
        if(!_configuration.writeReady() && buf.b.hasRemaining())
        {
            return IceInternal.SocketOperation.Write;
        }

        _configuration.checkWriteException();
        return _transceiver.write(buf);
    }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:10,代码来源:Transceiver.cs


示例13: Transceiver

 //
 // Only for use by Connector, Acceptor
 //
 internal Transceiver(IceInternal.Transceiver transceiver)
 {
     _transceiver = transceiver;
     _configuration = Configuration.getInstance();
     _initialized = false;
     _readBuffer = new IceInternal.Buffer();
     _readBuffer.resize(1024 * 8, true); // 8KB buffer
     _readBuffer.b.position(0);
     _readBufferPos = 0;
     _buffered = _configuration.buffered();
 }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:14,代码来源:Transceiver.cs


示例14: startAccept

 public bool startAccept(IceInternal.AsyncCallback callback, object state)
 {
     //
     // The plug-in may not be fully initialized.
     //
     if(!_instance.initialized())
     {
         Ice.PluginInitializationException ex = new Ice.PluginInitializationException();
         ex.reason = "IceSSL: plug-in is not initialized";
         throw ex;
     }
     return _delegate.startAccept(callback, state);
 }
开发者ID:zhangwei5095,项目名称:ice,代码行数:13,代码来源:AcceptorI.cs


示例15: read

    public int read(IceInternal.Buffer buf, ref bool hasMoreData)
    {
        if(!_configuration.readReady() && buf.b.hasRemaining())
        {
            return IceInternal.SocketOperation.Read;
        }

        _configuration.checkReadException();

        if(_buffered)
        {
            while(buf.b.hasRemaining())
            {
                if(_readBufferPos == _readBuffer.b.position())
                {
                    _readBufferPos = 0;
                    _readBuffer.b.position(0);
                    _transceiver.read(_readBuffer, ref hasMoreData);
                    if(_readBufferPos == _readBuffer.b.position())
                    {
                        hasMoreData = false;
                        return IceInternal.SocketOperation.Read;
                    }
                }

                int pos = _readBuffer.b.position();
                Debug.Assert(pos > _readBufferPos);
                int requested = buf.b.remaining();
                int available = pos - _readBufferPos;
                Debug.Assert(available > 0);
                if(available >= requested)
                {
                    available = requested;
                }

                byte[] arr = new byte[available];
                _readBuffer.b.position(_readBufferPos);
                _readBuffer.b.get(arr);
                buf.b.put(arr);
                _readBufferPos += available;
                _readBuffer.b.position(pos);
            }
            hasMoreData = _readBufferPos < _readBuffer.b.position();
            return IceInternal.SocketOperation.None;
        }
        else
        {
            return _transceiver.read(buf, ref hasMoreData);
        }
    }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:50,代码来源:Transceiver.cs


示例16: initialize

 public int initialize(IceInternal.Buffer readBuffer, IceInternal.Buffer writeBuffer, ref bool hasMoreData)
 {
     _configuration.checkInitializeException();
     if(!_initialized)
     {
         int status = _transceiver.initialize(readBuffer, writeBuffer, ref hasMoreData);
         if(status != IceInternal.SocketOperation.None)
         {
             return status;
         }
         _initialized = true;
     }
     return IceInternal.SocketOperation.None;
 }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:14,代码来源:Transceiver.cs


示例17: write

 public static void write(IceInternal.BasicStream os__, MCS.GuiHub.PushData[] v__)
 {
     if(v__ == null)
     {
         os__.writeSize(0);
     }
     else
     {
         os__.writeSize(v__.Length);
         for(int ix__ = 0; ix__ < v__.Length; ++ix__)
         {
             os__.writeByte((byte)v__[ix__], 10);
         }
     }
 }
开发者ID:JiangJunGG,项目名称:SyAutoH,代码行数:15,代码来源:iConstDef.cs


示例18: read

    public bool read(IceInternal.Buffer buf)
    {
        if(!_initialized)
        {
            throw new Ice.SocketException();
        }

        if(!_configuration.readReady())
        {
            return false;
        }

        _configuration.checkReadException();
        return _transceiver.read(buf);
    }
开发者ID:Radulfr,项目名称:zeroc-ice,代码行数:15,代码来源:Transceiver.cs


示例19: ConnectorI

        //
        // Only for use by EndpointI.
        //
        internal ConnectorI(Instance instance, string host, EndPoint addr, IceInternal.NetworkProxy proxy, int timeout, 
                            string conId)
        {
            _instance = instance;
            _host = host;
            _logger = instance.communicator().getLogger();
            _addr = (IPEndPoint)addr;
            _proxy = proxy; 
            _timeout = timeout;
            _connectionId = conId;

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


示例20: AcceptorI

        internal AcceptorI(EndpointI endpoint, Instance instance, IceInternal.Acceptor del, string adapterName)
        {
            _endpoint = endpoint;
            _delegate = del;
            _instance = instance;
            _adapterName = adapterName;

            //
            // .NET requires that a certificate be supplied.
            //
            if(instance.certs().Count == 0)
            {
                Ice.SecurityException ex = new Ice.SecurityException();
                ex.reason = "IceSSL: certificate required for server endpoint";
                throw ex;
            }
        }
开发者ID:zhangwei5095,项目名称:ice,代码行数:17,代码来源:AcceptorI.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IceInternal.Direct类代码示例发布时间:2022-05-24
下一篇:
C# Ice.MarshalException类代码示例发布时间: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