]> code.octet-stream.net Git - m17rt/blob - m17app/src/adapter.rs
Parse incoming full packets and fan out to PacketAdapters
[m17rt] / m17app / src / adapter.rs
1 use crate::app::TxHandle;
2 use m17core::protocol::{LsfFrame, PacketType};
3 use std::sync::Arc;
4
5 pub trait PacketAdapter: Send + Sync + 'static {
6 fn adapter_registered(&self, handle: TxHandle);
7 fn tnc_started(&self);
8 fn tnc_closed(&self);
9 fn packet_received(&self, lsf: LsfFrame, packet_type: PacketType, content: Arc<[u8]>);
10 }
11
12 pub trait StreamAdapter: Send + Sync + 'static {}