Exemple #1
0
		public SslStreamBase(Stream stream)
		{
			if (stream == null)
			{
				throw new ArgumentNullException("stream");
			}
			if (!stream.CanRead || !stream.CanWrite)
			{
				throw new ArgumentException("Stream must allow read and write capabilities", "stream");
			}
			innerStream = stream;
            
			sniExt = new Sni(srvName);
		}
Exemple #2
0
		public SslStreamBase(Stream stream, bool ownStream)
		{
			if (stream == null)
			{
				throw new ArgumentNullException("stream");
			}
			if (!stream.CanRead || !stream.CanWrite)
			{
				throw new ArgumentException("Stream must allow read and write capabilities", "stream");
			}
			innerStream = stream;
            
			this.ownStream = ownStream;
			read_buffer = new byte[16384];
			//inHandshakeLoop = false;
			decrypted_data_stream = new MemoryStream();
            sniExt = new Sni(srvName);
		}