Skip to content

Commit

Permalink
Remove additive flag (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
twittner authored Sep 8, 2020
1 parent e2644c2 commit df476ef
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 28 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 0.8.0

- Upgrade step 4 of 4. This version always assumes the new semantics and
no longer sets the non-standard flag in intial window updates.
- The configuration option `lazy_open` is removed. Initial window updates
are sent automatically if the receive window is configured to be larger
than the default.

# 0.7.0

Upgrade step 3 of 4. This version sets the non-standard flag, but
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yamux"
version = "0.7.0"
version = "0.8.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "Apache-2.0 OR MIT"
description = "Multiplexer over reliable, ordered connections"
Expand Down
1 change: 0 additions & 1 deletion src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ impl<T: AsyncRead + AsyncWrite + Unpin> Connection<T> {
if extra_credit > 0 {
let mut frame = Frame::window_update(id, extra_credit);
frame.header_mut().syn();
frame.header_mut().additive();
log::trace!("{}: sending initial {}", self.id, frame.header());
self.socket.get_mut().send(&frame).await.or(Err(ConnectionError::Closed))?
}
Expand Down
9 changes: 0 additions & 9 deletions src/frame/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ impl<T: HasSyn> Header<T> {
pub fn syn(&mut self) {
self.flags.0 |= SYN.0
}

/// Set the [`ADD`] flag.
pub fn additive(&mut self) {
self.flags.0 |= ADD.0
}
}

impl<T: HasAck> Header<T> {
Expand Down Expand Up @@ -349,10 +344,6 @@ pub const FIN: Flags = Flags(4);
/// Indicates an immediate stream reset.
pub const RST: Flags = Flags(8);

/// Temporary flag indicating that the initial window update is additive.
/// (See https://github.com/paritytech/yamux/issues/92)
pub const ADD: Flags = Flags(0x8000);

/// The serialised header size in bytes.
pub const HEADER_SIZE: usize = 12;

Expand Down
17 changes: 0 additions & 17 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,6 @@ impl Config {
self.read_after_close = b;
self
}

/// Enable or disable the sending of an initial window update frame
/// when opening outbound streams.
///
/// When enabled, opening a new outbound stream will not result in an
/// immediate send of a frame, instead the first outbound data frame
/// will be marked as opening a stream.
///
/// When disabled (the current default), opening a new outbound
/// stream will result in a window update frame being sent immediately
/// to the remote. This allows opening a stream with a custom receive
/// window size (cf. [`Config::set_receive_window`]) which the remote
/// can directly make use of.
#[deprecated(since = "0.6.0")]
pub fn set_lazy_open(&mut self, _: bool) -> &mut Self {
self
}
}

// Check that we can safely cast a `usize` to a `u64`.
Expand Down

0 comments on commit df476ef

Please sign in to comment.