Skip to content

Commit f463864

Browse files
committed
rename to buffer_params()
1 parent e9b6146 commit f463864

File tree

6 files changed

+9
-19
lines changed

6 files changed

+9
-19
lines changed

CHANGES.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Changes
22

3-
## [0.6.3] - 2021-03-15
3+
## [0.6.4] - 2021-03-15
44

5-
* `HandshakeAck::buffer_sizes()` replaces individual methods for buffer sizes
5+
* `HandshakeAck::buffer_params()` replaces individual methods for buffer sizes
66

77
## [0.6.2] - 2021-03-04
88

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ntex-mqtt"
3-
version = "0.6.3"
3+
version = "0.6.4"
44
authors = ["ntex contributors <[email protected]>"]
55
description = "MQTT Client/Server framework for v5 and v3.1.1 protocols"
66
documentation = "https://docs.rs/ntex-mqtt"
@@ -12,7 +12,7 @@ exclude = [".gitignore", ".travis.yml", ".cargo/config"]
1212
edition = "2018"
1313

1414
[dependencies]
15-
ntex = "0.3.9"
15+
ntex = "0.3.10"
1616
bitflags = "1.2.1"
1717
derive_more = "0.99.11"
1818
futures = "0.3.13"
@@ -29,4 +29,4 @@ tokio-rustls = "0.22.0"
2929
openssl = "0.10"
3030
tokio-openssl = "0.6.1"
3131

32-
ntex = { version = "0.3.9", features = ["rustls", "openssl"] }
32+
ntex = { version = "0.3.10", features = ["rustls", "openssl"] }

src/v3/handshake.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl<Io, St> HandshakeAck<Io, St> {
143143
///
144144
/// By default max buffer size is 4kb for both read and write buffer,
145145
/// Min size is 256 bytes.
146-
pub fn buffer_sizes(
146+
pub fn buffer_params(
147147
mut self,
148148
max_read_buf: u16,
149149
max_write_buf: u16,

src/v3/server.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ where
388388

389389
log::trace!("Sending success handshake ack: {:#?}", pkt);
390390

391-
state.set_buffer_sizes(ack.read_hw, ack.write_hw, ack.lw);
391+
state.set_buffer_params(ack.read_hw, ack.write_hw, ack.lw);
392392
state.send(&mut ack.io, &ack.shared.codec, pkt).await?;
393393

394394
Ok((

src/v5/handshake.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl<Io, St> HandshakeAck<Io, St> {
134134
///
135135
/// By default max buffer size is 4kb for both read and write buffer,
136136
/// Min size is 256 bytes.
137-
pub fn buffer_sizes(
137+
pub fn buffer_params(
138138
mut self,
139139
max_read_buf: u16,
140140
max_write_buf: u16,
@@ -148,30 +148,20 @@ impl<Io, St> HandshakeAck<Io, St> {
148148

149149
#[doc(hidden)]
150150
#[deprecated(since = "0.6.3")]
151-
/// Set buffer low watermark size
152-
///
153-
/// Low watermark is the same for read and write buffers.
154-
/// By default lw value is 256 bytes.
155151
pub fn low_watermark(mut self, lw: u16) -> Self {
156152
self.lw = lw;
157153
self
158154
}
159155

160156
#[doc(hidden)]
161157
#[deprecated(since = "0.6.3")]
162-
/// Set read buffer high water mark size
163-
///
164-
/// By default read hw is 4kb
165158
pub fn read_high_watermark(mut self, hw: u16) -> Self {
166159
self.read_hw = hw;
167160
self
168161
}
169162

170163
#[doc(hidden)]
171164
#[deprecated(since = "0.6.3")]
172-
/// Set write buffer high watermark size
173-
///
174-
/// By default write hw is 4kb
175165
pub fn write_high_watermark(mut self, hw: u16) -> Self {
176166
self.write_hw = hw;
177167
self

src/v5/server.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ where
456456
ack.packet.server_keepalive_sec = Some(ack.keepalive as u16);
457457
}
458458

459-
state.set_buffer_sizes(ack.read_hw, ack.write_hw, ack.lw);
459+
state.set_buffer_params(ack.read_hw, ack.write_hw, ack.lw);
460460
state
461461
.send(&mut ack.io, &shared.codec, mqtt::Packet::ConnectAck(ack.packet))
462462
.await?;

0 commit comments

Comments
 (0)