in neqo-bin/src/client/http3.rs [292:321]
fn process_data_readable(
&mut self,
stream_id: StreamId,
fin: bool,
data: &[u8],
output_read_data: bool,
) -> Res<()> {
if let Some(out_file) = &mut self.out_file {
if !data.is_empty() {
out_file.write_all(data)?;
}
return Ok(());
} else if !output_read_data {
qdebug!("READ[{stream_id}]: {} bytes", data.len());
} else if let Ok(txt) = std::str::from_utf8(data) {
qdebug!("READ[{stream_id}]: {txt}");
} else {
qdebug!("READ[{stream_id}]: 0x{}", hex(data));
}
if fin {
if let Some(mut out_file) = self.out_file.take() {
out_file.flush()?;
} else {
qdebug!("<FIN[{stream_id}]>");
}
}
Ok(())
}