Example #1
0
 //
 //  The public Client and Server classes enforce the parameters rules before
 //  calling into this .ctor.
 //
 internal SslState(Stream innerStream, RemoteCertValidationCallback certValidationCallback, LocalCertSelectionCallback certSelectionCallback, EncryptionPolicy encryptionPolicy)
 {
     _innerStream = innerStream;
     _innerStreamAPM = new StreamAsyncHelper(innerStream);
     _reader = new FixedSizeReader(innerStream);
     _certValidationDelegate = certValidationCallback;
     _certSelectionDelegate = certSelectionCallback;
     _encryptionPolicy = encryptionPolicy;
 }
Example #2
0
        public StreamFramer(Stream Transport)
        {
            if (Transport == null || Transport == Stream.Null)
            {
                throw new ArgumentNullException("Transport");
            }

            _transport = Transport;
            _readHeaderBuffer = new byte[_curReadHeader.Size];
            _writeHeaderBuffer = new byte[_writeHeader.Size];

            _readFrameCallback = new AsyncCallback(ReadFrameCallback);
            _beginWriteCallback = new AsyncCallback(BeginWriteCallback);

            _transportAPM = new StreamAsyncHelper(_transport);
        }
 private void InitializeStreamPart()
 {
     _ReadHeader = new byte[4];
     _FrameReader = new FixedSizeReader(InnerStream);
     _innerStreamAPM = new StreamAsyncHelper(InnerStream);
 }
Example #4
0
 public FixedSizeReader(Stream transport)
 {
     _transport = transport;
     _transportAPM = new StreamAsyncHelper(transport);
 }