Commit Graph

8 Commits

Author SHA1 Message Date
202fa39a42 Fix comments for some MessageReader contants 2021-07-23 01:22:29 +07:00
bb1f73a755 Change character byte definitions into b'X' form 2021-07-22 18:54:12 +07:00
af3341c1e7 Refactor MessageReader for clarity
Rename `received_bytes` into `ue_received_bytes` and get rid of
`next_received_bytes` by reading relevant data into new byte buffer
instead.
2021-07-22 18:48:09 +07:00
0dedd1d1f1 Change MessageReader to use with_capacity
Some of the collections inside `MessageReader` were created with `new()`
instead of `with_capacity()` call. This patch fixes that or comments why
it was not done in some places.
2021-07-22 18:18:29 +07:00
b846fcf55b Fix MessageReader documentation 2021-07-22 18:11:44 +07:00
ba3ac088dd Refactor numeric constants for MessageReader 2021-07-22 18:03:48 +07:00
0a86852197 Add MessageReader implementation
I've decided that it would be a good idea to separete
compoments that transform text messages into byte chunks to send to
Unreal Engine and back. This means that each of them will have only one
responsibility and using them will be easier in case we decide to read
and write via tcp/ip in separate threads. The only interesting to them
both parameter is the amount of bytes that were confirmed to be received
from the Unreal Engine side, which can be easily shared "by hand".

This patch implements "reader" that accepts byte stream expected from
the game server and converts it into:
1. separate string messages;
2. amount of bytes game server reported to already have received.
2021-07-21 03:40:29 +07:00
5315a9e61b Initial commit 2020-11-17 13:05:42 +07:00