From 3e4f7aa5e21b4ead86fd1055e8162c5fd2144526 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Wed, 13 Jan 2021 23:03:40 -0500 Subject: [PATCH] still not working... ugh --- src/main.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index c707c1d..16afbd4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,6 +12,8 @@ use crate::color::Color; fn main() { let ctx = zmq::Context::new(); + //let socket = ctx.socket(zmq::PUSH).unwrap(); + //let socket = ctx.socket(zmq::REQ).unwrap(); let socket = ctx.socket(zmq::PUSH).unwrap(); socket.connect("tcp://127.0.0.1:5555").unwrap(); @@ -28,11 +30,22 @@ fn main() { let result = socket.send(&bytes, 0); match result { - Ok(_) => continue, + Ok(_) => {}, Err(e) => { - eprintln!("Error: {:?}", e); + eprintln!("Send Error: {:?}", e); thread::sleep(Duration::from_millis(5_000)); + continue; }, } + + /*let result = socket.recv_msg(0); + match result { + Ok(_) => {}, + Err(e) => { + eprintln!("Recv Error: {:?}", e); + thread::sleep(Duration::from_millis(5_000)); + continue; + }, + }*/ } }