mocopi_parser 0.3.1

A parser of streamed data from mocopi
Documentation
  • Coverage
  • 1.96%
    1 out of 51 items documented1 out of 14 items with examples
  • Size
  • Source code size: 13.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.72 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 24s Average build duration of successful builds.
  • all releases: 24s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dorayaki4369

mocopi-parser

mocopi-parser is a parser library of streamed data from mocopi.

Example

This example using local-ip-address crate.

use std::net::UdpSocket;
use local_ip_address::local_ip;

fn main() {
    let ip = local_ip().unwrap();
    let port = 12351;
    let addr = format!("{}:{}", ip, port);

    let socket = UdpSocket::bind(&addr).unwrap();

    let mut buff = [0u8; 2048];

    loop {
        socket.recv_from(buff).unwrap();

        let packet = mocopi_parser::parse(&buff).unwrap();
        
        println!("{:?}", packet);
    }
}

References

  1. mocopi receiver
  2. 技術仕様