[Add] Docs & patches

This commit is contained in:
Alex Emmet 2026-08-20 21:42:23 +02:00
commit 420831cd09
No known key found for this signature in database
3 changed files with 29 additions and 3 deletions

View file

@ -9,7 +9,7 @@ use crate::{
connection::{DecodeRejectionCounters, RuntimePolicy, classify_decode_error},
framing::{RetryClassifier, write_frame},
};
use mtp_codec::{CommunicationValue, DecodeLimits, TypeMap};
use mtp_codec::{CommunicationValue, DataType, DecodeLimits, TypeMap};
use mtp_common::CommunicationError;
use std::sync::Arc;
use std::sync::atomic::{AtomicU64, Ordering};
@ -67,6 +67,15 @@ impl<C: TransportConnection> GenericSender<C> {
if self.connection.close_reason().is_some() {
return Err(CommunicationError::StreamClosed);
}
if let Some(version) = value.get_str(DataType::Version) {
tracing::debug!(
message_type = ?value.get_type(),
version,
connected = ?value.get_data(DataType::Connected),
client_id = ?value.get_data(DataType::Id),
"sending MTP handshake response frame"
);
}
match self.policy.send_mode {
crate::SendMode::SingleStreamPerMessage => {
let mut stream = self.open().await?;