diff --git a/gatunad/Cargo.toml b/gatunad/Cargo.toml index a4e2756..dbd51c0 100644 --- a/gatunad/Cargo.toml +++ b/gatunad/Cargo.toml @@ -10,7 +10,7 @@ path = "src/main.rs" [dependencies] libc = "0.2" -tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "sync", "io-util"] } +tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "sync", "io-util", "time"] } clap = { version = "4", features = ["derive"] } pnet_datalink = "0.35" tracing = "0.1" diff --git a/gatunad/src/session.rs b/gatunad/src/session.rs index 7a017d1..c4807e1 100644 --- a/gatunad/src/session.rs +++ b/gatunad/src/session.rs @@ -33,7 +33,7 @@ pub struct RecvState { } impl SendState { - fn new() -> Self { + pub fn new() -> Self { SendState { send_seq: 0, acked_seq: 0, @@ -83,7 +83,7 @@ impl SendState { } impl RecvState { - fn new() -> Self { + pub fn new() -> Self { RecvState { expected_seq: 0, deliver_seq: 0, @@ -155,7 +155,7 @@ pub async fn handle_data( seq: u32, ack_seq: u32, payload: &[u8], - tx: &TxChan, + _tx: &TxChan, ) -> Result { let handle = { let store = store.lock().expect("store lock poisoned");