rosnodejs icon indicating copy to clipboard operation
rosnodejs copied to clipboard

[tcpros -subscriber ] receiving a big message failed du to tcp window

Open maxired opened this issue 13 years ago • 2 comments

Being a subscriber receiving a big mesage, ie a sensor_msgs/image with a big image, receiving the message failed.

The fact is that we try to parse the message but we have only a part of the message. We got only part of the message because du to the TCP behavior, the ros message is splitted in different tcp packets.

We need to bufferized the packet until the size of the received data is equal to the length of the message.

maxired avatar Jul 12 '12 07:07 maxired

Oh, interesting. I agree the packets need buffered then. Do you know if the TCP library emits an event when the payload has finished?

baalexander avatar Jul 12 '12 15:07 baalexander

The fact is it's not TCP jobs. This is an "application" issue, and that's why the length is the first thing to be transmitted in the ROS message protocol.

maxired avatar Jul 12 '12 20:07 maxired