[−][src]Crate tokio_ddmw
Utility library for creating integrations against the Data Diode Middleware.
ⓘThis example deliberately fails to compile
use tokio_ddmw::ClntIfCodec; async fn conn_handler( socket: TcpStream ) -> Result<(), Error> { let mut conn = Framed::new(socket, ClntIfCodec::new()); while let Some(o) = conn.next().await { let o = o?; match o { Input::Telegram(tg) => { match tg.get_topic() { Some(t) if t == "Ok" => { if let Some(name) = tg.get_param("Id") { // ... } Some(t) if t == "Fail" => { // ... } } _ => { // ... } } Input::Bin(d, remain) => { // ... } } } } }
Re-exports
pub use err::Error; |
Modules
clntif | |
clntif_codec | A tokio-util |
clntif_util | |
err |