I left a XXX about this here<https://github.com/mozilla/rust/blob/master/src/libstd/rt/uv/uvio.rs#L958>. I'm pretty sure libuv drops the remainder of the packet, but I haven't confirmed that. I think the best way to deal with this is to raise a PartialPacketRead condition.
On Mon, Sep 16, 2013 at 3:18 PM, Brian Anderson <[email protected]>wrote: > On 09/16/2013 02:06 PM, Maik Klein wrote: > >> https://gist.github.com/**MaikKlein/6586333<https://gist.github.com/MaikKlein/6586333> >> >> Basically what happens is that a packet is read "partially" if the buffer >> is to small for the packet. According to http://gafferongames.com/** >> networking-for-game-**programmers/sending-and-**receiving-packets/<http://gafferongames.com/networking-for-game-programmers/sending-and-receiving-packets/>this >> should not happen. >> >> In my case I send [99u8,99u8] which should be of size 512 and my buffer >> is [0u8,..1] which should be of size 256. But it still receives the first >> 99. >> > > I'm not sure what is correct, but this behavior appears to be inherited > from libuv. I wonder if the rest of the packet is delivered in subsequent > reads or if part of the packet is just discarded. > > ______________________________**_________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/**listinfo/rust-dev<https://mail.mozilla.org/listinfo/rust-dev> >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
