From ee852aeeb942ef403cee164774ccd46ae33fa800 Mon Sep 17 00:00:00 2001 From: Timon Date: Thu, 24 Sep 2020 08:39:48 +0200 Subject: [PATCH] 0.4 (#281) --- Cargo.toml | 8 ++++---- docs/CHANGELOG.md | 13 +++++++++++++ src/infrastructure/fragmenter.rs | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bb80ddda..d93c1623 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "laminar" -version = "0.3.2" +version = "0.4.0" authors = [ "Lucio Franco ", "Fletcher Haynes ", @@ -22,17 +22,17 @@ edition = "2018" [dependencies] byteorder = "1.3" crc = "1.8" -crossbeam-channel = "0.3" +crossbeam-channel = "0.4" lazy_static = "1.4" log = "0.4" rand = "0.7" rand_pcg = "0.2" clap = { version = "2.33", features = ["yaml"], optional = true } -env_logger = { version = "0.6", optional = true } +env_logger = { version = "0.7", optional = true } [dev-dependencies] -bincode = "1.1.4" +bincode = "1.3.1" criterion = "0.3" serde = "1.0" serde_derive = "1.0" diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index eb34a649..25e76b93 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,19 @@ # Change Log This document contains information about the releases of this crate. +## [0.4.0] - 2019-09-24 +- Better interface separation with clear functionality boundaries. +- Separated unit tests and integration tests. +- Removed `set_link_conditioner` from `Socket` +- Make `last_sent` sent with unreliable packets. +- Change allocations to iterators. +- Canonicalizes an "established connection" as requiring both a send and a receive from a given endpoint. +- Change `SocketEvent::Connect` to only fire when a connection has been established. +- Add `SocketEvent::Disconnect` to fire when a Timeout fires from an endpoint with an established connection. +- Change `SocketEvent::Timeout` to fire when a Timeout fires from an endpoint with an unestablished connection. +- Change heartbeats to only send after a connection has been established. +- Add a `max_unestablished_connections` config option to prevent connection memory overflow attack + ## [0.3.2] - 2019-09-24 - Acknowledgement is sent after all fragments arrived - Don't read out-of-bounds on malformed headers diff --git a/src/infrastructure/fragmenter.rs b/src/infrastructure/fragmenter.rs index 80a0c030..f55656e0 100644 --- a/src/infrastructure/fragmenter.rs +++ b/src/infrastructure/fragmenter.rs @@ -58,7 +58,7 @@ impl Fragmentation { } else { 0 }; - ((payload_length / fragment_size) + remainder) + (payload_length / fragment_size) + remainder } /// Splits the given payload into fragments and write those fragments to the passed packet data.