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); }
public void Send(SslAppData sad) { SslRecord sr = new SslRecord(); sr.SetContentType(SslRecord.CT_APPLICATION_DATA); sr.SetFragment(sad.GetBytes()); this.Send(sr); }
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); }
public void Send(SslRecord sr) { this.s.Send(sr.GetBytes()); }