futile/enet-rs

`enet::Address` byte order issue when read from `enet::Peer`

949f45ac opened this issue · 3 comments

Hey there! Thank for this cool library.

I’ve come across a small issue while using it. It appears that if an enet::Address is read (back) from the ENet library, the byte order ends up wrong, at least on my ordinary LE system. Meanwhile, if I manually construct an enet::Address via ::new, it has the 'right' byte order.

Meaning, if I call Address::new(Ipv4Addr::LOCALHOST, 5000).ip().to_string() then I get 127.0.0.1;
but for a given peer.address().ip().to_string() I would get 1.0.0.127.

Would be great if you could fix this!
Cheers

See #10 and #9 ;)

Hi, sorry for the delay! This should be fixed in 0.2.4 (and on master), please let me know if it works :) The fix can be found in #17 (which is basically #10 with some adjustments).

Thanks for the report!

I will assume the fix worked, if that is not the case, please reopen this issue! Thanks for reporting again!