lemunozm / message-io

Fast and easy-to-use event-driven network library.
Apache License 2.0
1.11k stars 74 forks source link

Use integer_encoding crate for varint encoding in tcp header #62

Closed Uriopass closed 3 years ago

Uriopass commented 3 years ago

closes #60

Uriopass commented 3 years ago

about the "being compatible with x32 machines". I think the problem is that if a packet of size bigger than u32::MAX is ever sent, it will never be able to be decoded on a 32 machine as it's address size is not big enough.

Uriopass commented 3 years ago

Maybe we should keep usize.. So that packets sent by x64 machines can be big, but the very big ones cannot be sent to 32bits machines, which is not a problem anyway since it can't be decoded.

lemunozm commented 3 years ago

I just read your last message after I answer about that, sorry. I left the answer in the comment review

Uriopass commented 3 years ago

I think I addressed all your comments, and decided on using usize in the end :D.

lemunozm commented 3 years ago

Cool! Added :)

Thank you so much for your help! :)