diff options
| author | Fuwn <[email protected]> | 2021-05-23 13:51:20 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-23 13:51:20 +0000 |
| commit | 59cd17d4b5b1eff2847a954012eb916db4ef5116 (patch) | |
| tree | 4074d9935949a48c64fdaa8503ae9ddc61e7678e /crates/whirl_server/src/packet_parser.rs | |
| parent | build(cargo): create a fast builds configuration for cargo (diff) | |
| download | whirl-59cd17d4b5b1eff2847a954012eb916db4ef5116.tar.xz whirl-59cd17d4b5b1eff2847a954012eb916db4ef5116.zip | |
docs(global): add new documentation
Diffstat (limited to 'crates/whirl_server/src/packet_parser.rs')
| -rw-r--r-- | crates/whirl_server/src/packet_parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/whirl_server/src/packet_parser.rs b/crates/whirl_server/src/packet_parser.rs index bfeba9e..79293cb 100644 --- a/crates/whirl_server/src/packet_parser.rs +++ b/crates/whirl_server/src/packet_parser.rs @@ -3,13 +3,13 @@ use bytes::BytesMut; -/// Read all commands from the given buffer. +/// Read all commands from the given `buffer`. /// /// # Process -/// 1. Get a command from `buffer` based on first byte. +/// 1. Read a command from `buffer` based on it's first byte. /// 2. Push command to `commands`. /// 3. Remove command from `buffer`. -/// 4. Iterate and do this for all commands within `buffer`. +/// 4. Iterate and do this for the remaining commands within `buffer`. pub fn parse_commands_from_packet(mut buffer: BytesMut) -> Vec<BytesMut> { let mut commands: Vec<BytesMut> = Vec::new(); trace!("initial buffer: {:?}, length: {}", buffer, buffer.len()); |