Example #1
0
        public int Recv(SslAppData sad)
        {
            SslRecord sr = new SslRecord();
            int       n  = this.Recv(sr);

            sad.SetBytes(sr.GetBytes(), SslRecord.SSL_RECORD_HEADER_SIZE, n - SslRecord.SSL_RECORD_HEADER_SIZE);
            return(n);
        }
Example #2
0
        public void Send(SslAppData sad)
        {
            SslRecord sr = new SslRecord();

            sr.SetContentType(SslRecord.CT_APPLICATION_DATA);
            sr.SetFragment(sad.GetBytes());

            this.Send(sr);
        }
Example #3
0
        public int Recv(SslRecord sr)
        {
            int n = 0;

            byte[] b = new byte[SslRecord.SSL_RECORD_MAX_LENGTH];

            n = this.s.Receive(b);
            sr.SetBytes(b, n);

            return(n);
        }
Example #4
0
 public void Send(SslRecord sr)
 {
     this.s.Send(sr.GetBytes());
 }