[−][src]Crate rmonitor
A simple Tokio-compatible Decoder
implementation of the RMonitor Protocol
supported by a variety of sports timing software.
Example
use rmonitor::RMonitorDecoder; use tokio::net::TcpStream; use tokio_util::codec::FramedRead; #[tokio::main] async fn main() -> Result<(), Box<dyn Error>> { // Connect to an RMonitor server let stream = TcpStream::connect("127.0.0.1:4000").await?; // Create a FramedReader with our decoder let mut reader = FramedRead::new(stream, RMonitorDecoder::new_with_max_length(2048)); // Print out all the messages we receive while let Some(Ok(event)) = reader.next().await { println!("{:?}", event); } }
Re-exports
pub use codec::RMonitorDecoder; |
Modules
codec | A tokio-util |
protocol | Protocol implementation for decoding RMonitor messages. |