zedmq 0.7.0

A lightweight, safe, pure-Rust ØMQ/ZMTP library implementation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::io;

use zedmq::prelude::*;

fn main() -> io::Result<()> {
    let address = std::env::var("ADDRESS").unwrap();
    let mut socket: Push = zedmq::connect("tcp", address.as_str()).unwrap();

    let msg = (b"oof" as &[u8]).to_vec();

    loop {
        let _ = socket.send(vec![msg.clone(), vec![0, 1]]).unwrap();
        println!("Send!");
        std::thread::sleep(std::time::Duration::from_secs(1));
    }
}