go-ricochet/utils
John Brooks 47ba383334 Improve packet-layer buffering and parsing logic
SendRicochetPacket now has error handling, correctly encodes channel
ids, accepts any io.Writer, and ensures that all data is written. All
callers should be changed at some point to handle errors also.

RecvRicochetPackets is refactored to return only one packet per call and
avoid reading more data than it will consume, which simplifies the logic
and fixes a number of problems with short reads or large packets. Also
fixed an error in bounds checking that caused a remote panic for invalid
packet sizes. It also now accepts any io.Reader.

Tests are updated and expanded, and now pass.

Changes to Ricochet.processConnection are whitespace-only, because of
the removal of the inner packets loop.
2016-10-02 17:49:12 -07:00
..
error.go Refactor GoRicochet 2016-07-02 18:52:28 -07:00
networking.go Improve packet-layer buffering and parsing logic 2016-10-02 17:49:12 -07:00
networking_test.go Improve packet-layer buffering and parsing logic 2016-10-02 17:49:12 -07:00
networkresolver.go Refactor GoRicochet 2016-07-02 18:52:28 -07:00
tor.go Refactor GoRicochet 2016-07-02 18:52:28 -07:00
tor_test.go Refactor GoRicochet 2016-07-02 18:52:28 -07:00