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.
7 years ago
Titouan Rigoudy
5a980dbba1
Replace ProtoDecode with Decode, remove ProtoDecoder.
7 years ago
Titouan Rigoudy
766d11d564
Remove DecodeError, use io::Error instead.
7 years ago
Titouan Rigoudy
babead97ab
Use field-init shorthand when constructing proto messages.
7 years ago
Titouan Rigoudy
a62b73a752
Run cargo fmt.
7 years ago
Titouan Rigoudy
0a58bfde91
Add round-trip encoding test for basic protocol types.
7 years ago
Titouan Rigoudy
3b055fa9e0
Add invalid code test for decoding ServerRequests.
7 years ago
Titouan Rigoudy
d11d7bcd01
Simplify server request round-trip tests.
7 years ago
Titouan Rigoudy
65ef05ed06
Implement Proto{De,En}code for ServerRequest.
7 years ago
Titouan Rigoudy
33464dec4e
Implement Proto{De,En}code for remaining ServerRequest variants.
7 years ago
Titouan Rigoudy
c6b28958c0
Start implementing Proto{De,En}code for server requests.
7 years ago
Titouan Rigoudy
fbaa25d57e
Run (deprecated, old, stable-compatible) rustfmt.
7 years ago
Titouan Rigoudy
4bdab9bd32
Add FileSearchRequest, Response.
9 years ago
Titouan Rigoudy
332a654a87
Implement most of the NAT traversal protocol, still no listening port.
9 years ago
Titouan Rigoudy
82b4f36da0
Change WriteToPacket signature to use &self.
9 years ago
Titouan Rigoudy
2c7b0bb2bc
Change Packets to not special-case the code header.
9 years ago
Titouan Rigoudy
1caed415af
Use read_value and write_value in packet read/write macros.
9 years ago
Titouan Rigoudy
0bd1485296
Split MutPacket out of Packet, add OutBuf.
9 years ago
Titouan Rigoudy
a44713473a
Remove read/write_port and comment proto::packet.
9 years ago
Titouan Rigoudy
d59ac09ca0
Use ReadFromPacket and WriteToPacket traits to simplify packet I/O.
9 years ago
Titouan Rigoudy
402e5a7619
Rename FromPacket to ReadFromPacket and move traits to packet.
9 years ago
Titouan Rigoudy
04d6713ef1
Use new try_to_packet! macro in ServerRequest::to_packet.
9 years ago
Titouan Rigoudy
99f298f0c8
Add proto::UserNotFoundRequest/Response.
9 years ago
Titouan Rigoudy
65c437a022
Add RoomLeaveResponse/Request, unhandled as yet.
9 years ago
Titouan Rigoudy
d45193cc78
Rename JoinRoom to RoomJoin.
9 years ago
Titouan Rigoudy
0faa323300
Rename SayRoom to RoomMessage.
9 years ago
Titouan Rigoudy
b50cc29d58
Add proto::server::SayRoom{Request, Response}.
9 years ago
Titouan Rigoudy
7285cf51c9
Add RoomMap, Client::server_send, Client::control_send.
9 years ago
Titouan Rigoudy
d2194a7675
Initial support of controller JoinRoomRequest.
9 years ago
Titouan Rigoudy
a0272c1d50
Add PeerAddressRequest.
9 years ago
Titouan Rigoudy
e6c8338f7e
Refactor server code into its own module.
9 years ago