lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
980 stars 388 forks source link

Fix issues with out of order udp packets in udpm and mpdupm dropping messages. #342

Closed drc0308 closed 3 years ago

drc0308 commented 3 years ago

In using LCM I noticed message loss of packets greater than a UDP datagram occasionally. I was able to track it down due to receiving out of order fragments likely due to UDP. I pulled PR #175 into my local repository after noticing it was previously discovered, and after some extensive testing confirmed this resolved my issues. Opening this PR as there were some merge conflicts that needed resolution, and I did not have access to the original branch to resolve them.

Overview of changes, copied from this PR: lcm_frag_buff type has an extra pointer and an extra uin32_t conatined within a new struct More packets could potentially wind up in the fragment hash table Hashing function has an additional multiplication Hash pointer equality check has an additional condition