mirror of
https://github.com/storytold/point-generator.git
synced 2026-10-21 07:45:04 +00:00
still not working... ugh
This commit is contained in:
+15
-2
@@ -12,6 +12,8 @@ use crate::color::Color;
|
|||||||
fn main() {
|
fn main() {
|
||||||
let ctx = zmq::Context::new();
|
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();
|
let socket = ctx.socket(zmq::PUSH).unwrap();
|
||||||
|
|
||||||
socket.connect("tcp://127.0.0.1:5555").unwrap();
|
socket.connect("tcp://127.0.0.1:5555").unwrap();
|
||||||
@@ -28,11 +30,22 @@ fn main() {
|
|||||||
let result = socket.send(&bytes, 0);
|
let result = socket.send(&bytes, 0);
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
Ok(_) => continue,
|
Ok(_) => {},
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
eprintln!("Error: {:?}", e);
|
eprintln!("Send Error: {:?}", e);
|
||||||
thread::sleep(Duration::from_millis(5_000));
|
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;
|
||||||
|
},
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user