mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-16 20:55:03 +01:00
fixed class and method index
This commit is contained in:
parent
217a419ef1
commit
2903ba108e
8 changed files with 1208 additions and 1226 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use crate::error::{ConException, ProtocolError, Result, TransError};
|
||||
use anyhow::Context;
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
use tracing::debug;
|
||||
|
||||
const REQUIRED_FRAME_END: u8 = 0xCE;
|
||||
|
||||
|
|
@ -33,6 +34,8 @@ pub async fn write_frame<W>(mut w: W, frame: &Frame) -> Result<()>
|
|||
where
|
||||
W: AsyncWriteExt + Unpin,
|
||||
{
|
||||
debug!(?frame, "sending frame");
|
||||
|
||||
w.write_u8(frame.kind as u8).await?;
|
||||
w.write_u16(frame.channel).await?;
|
||||
w.write_u32(u32::try_from(frame.payload.len()).context("frame size too big")?)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue