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


C# IceInternal类代码示例

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


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


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