Open Riemannstein opened 3 years ago
IIRC there is an empty frame in the multipart message between identity and the actual message frames?
IIRC there is an empty frame in the multipart message between identity and the actual message frames?
Thanks for the hint. Does that mean I am simply not printing the message correctly? This is currently how I print it. What changes should I make ?
let data = socket.recv_multipart(0).unwrap();
println!(
"Identity: {:?} Message : {}",
data[0],
str::from_utf8(&data[1]).unwrap()
);
Try data[2]
.
Try
data[2]
.
Seems the length is 2. The exception returned:
thread 'main' panicked at 'index out of bounds: the len is 2 but the index is 2', examples/zmq/receive.rs:15:29
This is the data received using python script receiving data:
OK, then that's not the case. However, if you can reproduce in Python, it's not a rust-zmq problem...
OK, then that's not the case. However, if you can reproduce in Python, it's not a rust-zmq problem...
I would say it is not the problem on the receiving end. The sending end is still through rust-zmq. But again, it could be an elementary question. Any help is greatly appreciated.
So wird the sender in Python it works?
@birkenfeld unfortunately I faced the same bug which the receiver receives empty string. can help?
I understand this might be an elementary question. But I kind of got stuck here. Any help is greatly appreciated.
I use the following examples to send (send.rs) and receive (receive.rs, which is the same as the official example logserver.rs) messages:
Sender:
examples.zip
The sender sends messages:![image](https://user-images.githubusercontent.com/22661421/92088404-667af900-edff-11ea-97c5-b10ddc21a9da.png)
But the receiver does not receive the desired "abc\n" supposedly sent by the sender:
Thanks in advance for your time.