pub fn send_msg(&mut self, m: Message, must_encrypt: bool) {
        #[cfg(feature = "quic")]
        {
            if let Protocol::Quic = self.protocol {
                if let MessagePayload::Alert(alert) = m.payload {
                    self.quic.alert = Some(alert.description);
                } else {
                    debug_assert!(if let MessagePayload::Handshake(_) = m.payload { true } else { false },
                                  "QUIC uses TLS for the cryptographic handshake only");
                    let mut bytes = Vec::new();
                    m.payload.encode(&mut bytes);
                    self.quic.hs_queue.push_back((must_encrypt, bytes));
                }
                return;
            }
        }
        if !must_encrypt {
            let mut to_send = VecDeque::new();
            self.message_fragmenter.fragment(m, &mut to_send);
            for mm in to_send {
                self.queue_tls_message(mm);
            }
        } else {
            self.send_msg_encrypt(m);
        }
    }
/// Send a raw TLS message, fragmenting it if needed.
Send a raw TLS message, fragmenting it if needed.
Send a raw TLS message fragmenting it if needed .
pub fn send_msg(&mut self, m: Message, must_encrypt: bool) {
        #[cfg(feature = "quic")]
        {
            if let Protocol::Quic = self.protocol {
                if let MessagePayload::Alert(alert) = m.payload {
                    self.quic.alert = Some(alert.description);
                } else {
                    debug_assert!(if let MessagePayload::Handshake(_) = m.payload { true } else { false },
                                  "QUIC uses TLS for the cryptographic handshake only");
                    let mut bytes = Vec::new();
                    m.payload.encode(&mut bytes);
                    self.quic.hs_queue.push_back((must_encrypt, bytes));
                }
                return;
            }
        }
        if !must_encrypt {
            let mut to_send = VecDeque::new();
            self.message_fragmenter.fragment(m, &mut to_send);
            for mm in to_send {
                self.queue_tls_message(mm);
            }
        } else {
            self.send_msg_encrypt(m);
        }
    }
pub fn send_msg ( & mut self , m : Message , must_encrypt : bool ) { # [ cfg ( feature " " ) ] { if let Protocol :: Quic = self . protocol { if let MessagePayload :: Alert ( alert ) = m . payload { self . quic . alert = Some ( alert . description ) ; } else { debug_assert ! ( if let MessagePayload Handshake ( ) m payload { true } else { false } " " ) ; let mut bytes = Vec :: new ( ) ; m . payload . encode ( & mut bytes ) ; self . quic . hs_queue . push_back ( ( must_encrypt , bytes ) ) ; } return ; } } if ! must_encrypt { let mut to_send = VecDeque :: new ( ) ; self . message_fragmenter . fragment ( m , & mut to_send ) ; for mm in to_send { self . queue_tls_message ( mm ) ; } } else { self . send_msg_encrypt ( m ) ; } }
Send a raw TLS message, fragmenting it if needed.
Send a raw TLS message fragmenting it if needed .
&mut self
m
Message
must_encrypt
bool
&mut self
m
Message
must_encrypt
bool