Titouan Rigoudy
571f7cd3e9
Define small lib.rs for integration testing.
5 years ago
Titouan Rigoudy
903864f1cd
Define proto::core module.
5 years ago
Titouan Rigoudy
45842cdf93
Rename value_codec.rs to value.rs.
5 years ago
Titouan Rigoudy
381ec05247
Set indent width to 2.
5 years ago
Titouan Rigoudy
83620698fd
Set 80-char line width.
5 years ago
Titouan Rigoudy
e147ab7076
Update `bytes` dependency to 1.0.
5 years ago
Titouan Rigoudy
e8b2b47aed
Squash a bunch of warnings with allow attributes.
5 years ago
Titouan Rigoudy
59a9f6bf90
Rename base_codec.rs to value_codec.rs.
5 years ago
Titouan Rigoudy
b18fe56f05
Rename Proto{En,De}code to Value{En,De}code.
5 years ago
Titouan Rigoudy
7bb290f0ef
Introduce ProtoEncodeError and use it in ProtoEncoder.
Tests are not fixed yet.
5 years ago
Titouan Rigoudy
c9ffdc5392
Introduce ProtoDecodeError and use it in ProtoDecoder.
5 years ago
Titouan Rigoudy
468c404765
Simplify ProtoDecoder by removing dependency on the bytes crate.
Improve decoding error messages by annotating them with the position
at which the error was encountered. This could use some improvement
in a follow-up by introducing a specific Error type instead of
piggy-backing onto std::io::Error.
It is easier and more generically useful to accept any byte slice
as a buffer. In addition our zero-copy use of the underlying buffer
does not align particularly well with std::io::Read, so we move away
from std::io::Cursor as well.
5 years ago
Titouan Rigoudy
6dee714bfd
Run cargo fmt.
6 years ago
Titouan Rigoudy
f78448d3e8
Upgrade to Rust 2018 edition.
6 years ago
Titouan Rigoudy
c48673c390
Introduce ProtoDecoder instead of extending Buf trait.
7 years ago
Titouan Rigoudy
585e9a5873
Fix use declarations in tests.
7 years ago
Titouan Rigoudy
da6aa38593
Run rustfmt.
7 years ago
Titouan Rigoudy
f9de193b02
Fix unused imports.
8 years ago
Titouan Rigoudy
5a980dbba1
Replace ProtoDecode with Decode, remove ProtoDecoder.
8 years ago
Titouan Rigoudy
766d11d564
Remove DecodeError, use io::Error instead.
8 years ago
Titouan Rigoudy
babead97ab
Use field-init shorthand when constructing proto messages.
8 years ago
Titouan Rigoudy
a62b73a752
Run cargo fmt.
8 years ago
Titouan Rigoudy
0a58bfde91
Add round-trip encoding test for basic protocol types.
8 years ago
Titouan Rigoudy
3b055fa9e0
Add invalid code test for decoding ServerRequests.
8 years ago
Titouan Rigoudy
a69614a89a
Return an error when decoding unknown peer message code.
8 years ago
Titouan Rigoudy
c2db26119b
Add round-trip test for pierce firewall peer message.
8 years ago
Titouan Rigoudy
1e633d9a43
Add tests for peer message encoding and decoding.
8 years ago
Titouan Rigoudy
de7025edc8
Implement ProtoDecode and ProtoEncode for peer messages.
8 years ago
Titouan Rigoudy
fbaa25d57e
Run (deprecated, old, stable-compatible) rustfmt.
8 years ago
Titouan Rigoudy
2ad5f19850
Add basic communication with peers.
9 years ago