mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-17 05:05:03 +01:00
better parser generation
This commit is contained in:
parent
c43126af1f
commit
83778ac2c9
10 changed files with 859 additions and 516 deletions
|
|
@ -1,5 +1,6 @@
|
|||
use crate::error::{ProtocolError, TransError};
|
||||
use crate::frame;
|
||||
use crate::frame::FrameType;
|
||||
use anyhow::Context;
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
use tokio::net::TcpStream;
|
||||
|
|
@ -27,6 +28,10 @@ impl Connection {
|
|||
loop {
|
||||
let frame = frame::read_frame(&mut self.stream, 10000).await?;
|
||||
debug!(?frame, "received frame");
|
||||
if frame.kind == FrameType::Method {
|
||||
let class = super::classes::parse_method(&frame.payload)?;
|
||||
debug!(?class, "was method frame");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue