From 79f3a8026c82546241780d85b5e0513286aefacd Mon Sep 17 00:00:00 2001 From: David Palm Date: Tue, 13 Apr 2021 14:42:00 +0200 Subject: [PATCH 01/12] Sokketto sends close reason as an Incoming::Closed --- Cargo.toml | 5 ++- transports/websocket/Cargo.toml | 2 +- transports/websocket/src/framed.rs | 50 +++++++++++++++++++++++------- 3 files changed, 44 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 656bbebdf04..d95d95aff29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,7 +92,7 @@ libp2p-deflate = { version = "0.28.0", path = "transports/deflate", optional = t libp2p-dns = { version = "0.28.0", path = "transports/dns", optional = true, default-features = false } libp2p-mdns = { version = "0.29.0", path = "protocols/mdns", optional = true } libp2p-tcp = { version = "0.28.0", path = "transports/tcp", default-features = false, optional = true } -libp2p-websocket = { version = "0.29.0", path = "transports/websocket", optional = true } +libp2p-websocket = { version = "0.28.0", path = "transports/websocket", optional = true } [dev-dependencies] async-std = { version = "1.6.2", features = ["attributes"] } @@ -131,3 +131,6 @@ members = [ [[example]] name = "chat-tokio" required-features = ["tcp-tokio", "mdns"] + +[patch.crates-io] +soketto = { path = "../soketto" } diff --git a/transports/websocket/Cargo.toml b/transports/websocket/Cargo.toml index 64458370347..d4747eea5c3 100644 --- a/transports/websocket/Cargo.toml +++ b/transports/websocket/Cargo.toml @@ -2,7 +2,7 @@ name = "libp2p-websocket" edition = "2018" description = "WebSocket transport for libp2p" -version = "0.29.0" +version = "0.28.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/websocket/src/framed.rs b/transports/websocket/src/framed.rs index 204eddd836f..8b4c6baf952 100644 --- a/transports/websocket/src/framed.rs +++ b/transports/websocket/src/framed.rs @@ -29,7 +29,7 @@ use libp2p_core::{ transport::{ListenerEvent, TransportError} }; use log::{debug, trace}; -use soketto::{connection, extension::deflate::Deflate, handshake}; +use soketto::{connection::{self, CloseReason}, extension::deflate::Deflate, handshake}; use std::{convert::TryInto, fmt, io, mem, pin::Pin, task::Context, task::Poll}; use url::Url; @@ -455,7 +455,9 @@ pub enum IncomingData { /// UTF-8 encoded application data. Text(Vec), /// PONG control frame data. - Pong(Vec) + Pong(Vec), + /// Close reason + Closed(CloseReason), } impl IncomingData { @@ -479,7 +481,11 @@ impl IncomingData { match self { IncomingData::Binary(d) => d, IncomingData::Text(d) => d, - IncomingData::Pong(d) => d + IncomingData::Pong(d) => d, + IncomingData::Closed(reason) => { + let bytes = reason.code.to_le_bytes(); + bytes.to_vec() + } } } } @@ -489,7 +495,8 @@ impl AsRef<[u8]> for IncomingData { match self { IncomingData::Binary(d) => d, IncomingData::Text(d) => d, - IncomingData::Pong(d) => d + IncomingData::Pong(d) => d, + IncomingData::Closed(_) => unimplemented!(), } } } @@ -541,6 +548,7 @@ where Ok(sender) }); let stream = stream::unfold((Vec::new(), receiver), |(mut data, mut receiver)| async { + trace!(target: "dp", "Am I even in the right spot here???"); match receiver.receive(&mut data).await { Ok(soketto::Incoming::Data(soketto::Data::Text(_))) => { Some((Ok(IncomingData::Text(mem::take(&mut data))), (data, receiver))) @@ -551,8 +559,13 @@ where Ok(soketto::Incoming::Pong(pong)) => { Some((Ok(IncomingData::Pong(Vec::from(pong))), (data, receiver))) } - Err(connection::Error::Closed) => None, - Err(e) => Some((Err(e), (data, receiver))) + Ok(soketto::Incoming::Closed(reason)) => { + trace!("Closed because: {:?}", reason); + Some((Ok(IncomingData::Closed(reason)), (data, receiver))) + } + Err(e) => { + Some((Err(e), (data, receiver))) + } } }); Connection { @@ -587,7 +600,10 @@ where fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { let item = ready!(self.receiver.poll_next_unpin(cx)); let item = item.map(|result| { - result.map_err(|e| io::Error::new(io::ErrorKind::Other, e)) + result.map_err(|e| { + trace!("[poll_next] map_err"); + io::Error::new(io::ErrorKind::Other, e) + }) }); Poll::Ready(item) } @@ -602,24 +618,36 @@ where fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { Pin::new(&mut self.sender) .poll_ready(cx) - .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) + .map_err(|e| { + trace!("[poll_ready] Error: {:?}", e); + io::Error::new(io::ErrorKind::Other, e) + }) } fn start_send(mut self: Pin<&mut Self>, item: OutgoingData) -> io::Result<()> { Pin::new(&mut self.sender) .start_send(item) - .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) + .map_err(|e| { + trace!("[start_send] Error: {:?}", e); + io::Error::new(io::ErrorKind::Other, e) + }) } fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { Pin::new(&mut self.sender) .poll_flush(cx) - .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) + .map_err(|e| { + trace!("[poll_flush] Error: {:?}", e); + io::Error::new(io::ErrorKind::Other, e) + }) } fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { Pin::new(&mut self.sender) .poll_close(cx) - .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) + .map_err(|e| { + trace!("[poll_close] Error: {:?}", e); + io::Error::new(io::ErrorKind::Other, e) + }) } } From 2f9898d9085d9f1967b26dea8892d5a5191260e3 Mon Sep 17 00:00:00 2001 From: David Palm Date: Wed, 14 Apr 2021 09:57:22 +0200 Subject: [PATCH 02/12] Cleanup and add TODOs --- transports/websocket/src/framed.rs | 31 ++++++++---------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/transports/websocket/src/framed.rs b/transports/websocket/src/framed.rs index 8b4c6baf952..10992a43918 100644 --- a/transports/websocket/src/framed.rs +++ b/transports/websocket/src/framed.rs @@ -483,7 +483,8 @@ impl IncomingData { IncomingData::Text(d) => d, IncomingData::Pong(d) => d, IncomingData::Closed(reason) => { - let bytes = reason.code.to_le_bytes(); + // TODO: Figure out what makes sense here. + let bytes = reason.code.to_be_bytes(); bytes.to_vec() } } @@ -496,6 +497,7 @@ impl AsRef<[u8]> for IncomingData { IncomingData::Binary(d) => d, IncomingData::Text(d) => d, IncomingData::Pong(d) => d, + // TODO: Figure out what makes sense here. IncomingData::Closed(_) => unimplemented!(), } } @@ -548,7 +550,6 @@ where Ok(sender) }); let stream = stream::unfold((Vec::new(), receiver), |(mut data, mut receiver)| async { - trace!(target: "dp", "Am I even in the right spot here???"); match receiver.receive(&mut data).await { Ok(soketto::Incoming::Data(soketto::Data::Text(_))) => { Some((Ok(IncomingData::Text(mem::take(&mut data))), (data, receiver))) @@ -560,7 +561,6 @@ where Some((Ok(IncomingData::Pong(Vec::from(pong))), (data, receiver))) } Ok(soketto::Incoming::Closed(reason)) => { - trace!("Closed because: {:?}", reason); Some((Ok(IncomingData::Closed(reason)), (data, receiver))) } Err(e) => { @@ -600,10 +600,7 @@ where fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { let item = ready!(self.receiver.poll_next_unpin(cx)); let item = item.map(|result| { - result.map_err(|e| { - trace!("[poll_next] map_err"); - io::Error::new(io::ErrorKind::Other, e) - }) + result.map_err(|e| io::Error::new(io::ErrorKind::Other, e)) }); Poll::Ready(item) } @@ -618,36 +615,24 @@ where fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { Pin::new(&mut self.sender) .poll_ready(cx) - .map_err(|e| { - trace!("[poll_ready] Error: {:?}", e); - io::Error::new(io::ErrorKind::Other, e) - }) + .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) } fn start_send(mut self: Pin<&mut Self>, item: OutgoingData) -> io::Result<()> { Pin::new(&mut self.sender) .start_send(item) - .map_err(|e| { - trace!("[start_send] Error: {:?}", e); - io::Error::new(io::ErrorKind::Other, e) - }) + .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) } fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { Pin::new(&mut self.sender) .poll_flush(cx) - .map_err(|e| { - trace!("[poll_flush] Error: {:?}", e); - io::Error::new(io::ErrorKind::Other, e) - }) + .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) } fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { Pin::new(&mut self.sender) .poll_close(cx) - .map_err(|e| { - trace!("[poll_close] Error: {:?}", e); - io::Error::new(io::ErrorKind::Other, e) - }) + .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) } } From 362fb7d8eac12bf781f1beefd93c4778b842ab86 Mon Sep 17 00:00:00 2001 From: David Palm Date: Fri, 16 Apr 2021 14:09:36 +0200 Subject: [PATCH 03/12] Add is_close() Cleanup --- transports/websocket/src/framed.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/transports/websocket/src/framed.rs b/transports/websocket/src/framed.rs index 10992a43918..de7e04f9700 100644 --- a/transports/websocket/src/framed.rs +++ b/transports/websocket/src/framed.rs @@ -477,13 +477,16 @@ impl IncomingData { if let IncomingData::Pong(_) = self { true } else { false } } + pub fn is_close(&self) -> bool { + if let IncomingData::Closed(_) = self { true } else { false } + } + pub fn into_bytes(self) -> Vec { match self { IncomingData::Binary(d) => d, IncomingData::Text(d) => d, IncomingData::Pong(d) => d, IncomingData::Closed(reason) => { - // TODO: Figure out what makes sense here. let bytes = reason.code.to_be_bytes(); bytes.to_vec() } @@ -563,9 +566,7 @@ where Ok(soketto::Incoming::Closed(reason)) => { Some((Ok(IncomingData::Closed(reason)), (data, receiver))) } - Err(e) => { - Some((Err(e), (data, receiver))) - } + Err(e) => Some((Err(e), (data, receiver))) } }); Connection { From befca01056e7dbbc5871dd36f977cc00411b9254 Mon Sep 17 00:00:00 2001 From: David Palm Date: Tue, 20 Apr 2021 09:23:15 +0200 Subject: [PATCH 04/12] Resolve TODOs --- transports/websocket/src/framed.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/transports/websocket/src/framed.rs b/transports/websocket/src/framed.rs index de7e04f9700..719371dd836 100644 --- a/transports/websocket/src/framed.rs +++ b/transports/websocket/src/framed.rs @@ -456,7 +456,7 @@ pub enum IncomingData { Text(Vec), /// PONG control frame data. Pong(Vec), - /// Close reason + /// Close reason. Closed(CloseReason), } @@ -486,9 +486,8 @@ impl IncomingData { IncomingData::Binary(d) => d, IncomingData::Text(d) => d, IncomingData::Pong(d) => d, - IncomingData::Closed(reason) => { - let bytes = reason.code.to_be_bytes(); - bytes.to_vec() + IncomingData::Closed(CloseReason { code, ..}) => { + code.to_be_bytes().to_vec() } } } @@ -500,7 +499,6 @@ impl AsRef<[u8]> for IncomingData { IncomingData::Binary(d) => d, IncomingData::Text(d) => d, IncomingData::Pong(d) => d, - // TODO: Figure out what makes sense here. IncomingData::Closed(_) => unimplemented!(), } } From fca34fe63bb295b1971145a47105f2e86f84276e Mon Sep 17 00:00:00 2001 From: David Palm Date: Tue, 20 Apr 2021 09:33:34 +0200 Subject: [PATCH 05/12] Fetch soketto from git --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d95d95aff29..96a73711866 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,7 +92,7 @@ libp2p-deflate = { version = "0.28.0", path = "transports/deflate", optional = t libp2p-dns = { version = "0.28.0", path = "transports/dns", optional = true, default-features = false } libp2p-mdns = { version = "0.29.0", path = "protocols/mdns", optional = true } libp2p-tcp = { version = "0.28.0", path = "transports/tcp", default-features = false, optional = true } -libp2p-websocket = { version = "0.28.0", path = "transports/websocket", optional = true } +libp2p-websocket = { version = "0.29.0", path = "transports/websocket", optional = true } [dev-dependencies] async-std = { version = "1.6.2", features = ["attributes"] } @@ -133,4 +133,4 @@ name = "chat-tokio" required-features = ["tcp-tokio", "mdns"] [patch.crates-io] -soketto = { path = "../soketto" } +soketto = { git = "https://github.com/paritytech/soketto", branch = "dp-close-reason-as-incoming" } From 6bc34fdf3ac5c12b15869478ae48bf02e68bcab5 Mon Sep 17 00:00:00 2001 From: David Palm Date: Tue, 20 Apr 2021 09:33:51 +0200 Subject: [PATCH 06/12] Restore version number --- transports/websocket/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transports/websocket/Cargo.toml b/transports/websocket/Cargo.toml index d4747eea5c3..64458370347 100644 --- a/transports/websocket/Cargo.toml +++ b/transports/websocket/Cargo.toml @@ -2,7 +2,7 @@ name = "libp2p-websocket" edition = "2018" description = "WebSocket transport for libp2p" -version = "0.28.0" +version = "0.29.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" From 01df011f5a6604a66a82443d608c03e6d14fc656 Mon Sep 17 00:00:00 2001 From: David Palm Date: Fri, 28 May 2021 18:28:37 +0200 Subject: [PATCH 07/12] Rename `IncomingData` to `Incoming` Remove `Binary` and `Text` variants from `Incoming` Add a `Data` enum with `Binary` and `Text` members Move into_bytes and AsRef impls from `Incoming` to `Data` --- Cargo.toml | 3 -- transports/websocket/Cargo.toml | 2 +- transports/websocket/src/framed.rs | 81 ++++++++++++++++-------------- transports/websocket/src/lib.rs | 6 +-- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8400848df5c..32380b103fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -131,6 +131,3 @@ members = [ [[example]] name = "chat-tokio" required-features = ["tcp-tokio", "mdns"] - -[patch.crates-io] -soketto = { git = "https://github.com/paritytech/soketto", branch = "dp-close-reason-as-incoming" } diff --git a/transports/websocket/Cargo.toml b/transports/websocket/Cargo.toml index a7a378a5fdc..5a70968e5cd 100644 --- a/transports/websocket/Cargo.toml +++ b/transports/websocket/Cargo.toml @@ -17,7 +17,7 @@ libp2p-core = { version = "0.29.0", path = "../../core" } log = "0.4.8" quicksink = "0.1" rw-stream-sink = "0.2.0" -soketto = { version = "0.4.1", features = ["deflate"] } +soketto = { version = "0.5.0", features = ["deflate"] } url = "2.1" webpki-roots = "0.21" diff --git a/transports/websocket/src/framed.rs b/transports/websocket/src/framed.rs index 719371dd836..88f23547f22 100644 --- a/transports/websocket/src/framed.rs +++ b/transports/websocket/src/framed.rs @@ -442,65 +442,68 @@ fn location_to_multiaddr(location: &str) -> Result> { /// The websocket connection. pub struct Connection { - receiver: BoxStream<'static, Result>, + receiver: BoxStream<'static, Result>, sender: Pin + Send>>, _marker: std::marker::PhantomData } -/// Data received over the websocket connection. +/// Data or control information received over the websocket connection. #[derive(Debug, Clone)] -pub enum IncomingData { - /// Binary application data. - Binary(Vec), - /// UTF-8 encoded application data. - Text(Vec), +pub enum Incoming { + /// Application data. + Data(Data), /// PONG control frame data. Pong(Vec), /// Close reason. Closed(CloseReason), } -impl IncomingData { +/// Application data received over the websocket connection +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub enum Data { + /// Textual data. + Text(Vec), + /// Binary data. + Binary(Vec) +} + +impl Data { + pub fn into_bytes(self) -> Vec { + match self { + Data::Text(d) => d, + Data::Binary(d) => d + } + } +} + +impl AsRef<[u8]> for Data { + fn as_ref(&self) -> &[u8] { + match self { + Data::Text(d) => d, + Data::Binary(d) => d + } + } +} + +impl Incoming { pub fn is_data(&self) -> bool { self.is_binary() || self.is_text() } pub fn is_binary(&self) -> bool { - if let IncomingData::Binary(_) = self { true } else { false } + if let Incoming::Data(Data::Binary(_)) = self { true } else { false } } pub fn is_text(&self) -> bool { - if let IncomingData::Text(_) = self { true } else { false } + if let Incoming::Data(Data::Text(_)) = self { true } else { false } } pub fn is_pong(&self) -> bool { - if let IncomingData::Pong(_) = self { true } else { false } + if let Incoming::Pong(_) = self { true } else { false } } pub fn is_close(&self) -> bool { - if let IncomingData::Closed(_) = self { true } else { false } - } - - pub fn into_bytes(self) -> Vec { - match self { - IncomingData::Binary(d) => d, - IncomingData::Text(d) => d, - IncomingData::Pong(d) => d, - IncomingData::Closed(CloseReason { code, ..}) => { - code.to_be_bytes().to_vec() - } - } - } -} - -impl AsRef<[u8]> for IncomingData { - fn as_ref(&self) -> &[u8] { - match self { - IncomingData::Binary(d) => d, - IncomingData::Text(d) => d, - IncomingData::Pong(d) => d, - IncomingData::Closed(_) => unimplemented!(), - } + if let Incoming::Closed(_) = self { true } else { false } } } @@ -553,16 +556,16 @@ where let stream = stream::unfold((Vec::new(), receiver), |(mut data, mut receiver)| async { match receiver.receive(&mut data).await { Ok(soketto::Incoming::Data(soketto::Data::Text(_))) => { - Some((Ok(IncomingData::Text(mem::take(&mut data))), (data, receiver))) + Some((Ok(Incoming::Data(Data::Text(mem::take(&mut data)))), (data, receiver))) } Ok(soketto::Incoming::Data(soketto::Data::Binary(_))) => { - Some((Ok(IncomingData::Binary(mem::take(&mut data))), (data, receiver))) + Some((Ok(Incoming::Data(Data::Binary(mem::take(&mut data)))), (data, receiver))) } Ok(soketto::Incoming::Pong(pong)) => { - Some((Ok(IncomingData::Pong(Vec::from(pong))), (data, receiver))) + Some((Ok(Incoming::Pong(Vec::from(pong))), (data, receiver))) } Ok(soketto::Incoming::Closed(reason)) => { - Some((Ok(IncomingData::Closed(reason)), (data, receiver))) + Some((Ok(Incoming::Closed(reason)), (data, receiver))) } Err(e) => Some((Err(e), (data, receiver))) } @@ -594,7 +597,7 @@ impl Stream for Connection where T: AsyncRead + AsyncWrite + Send + Unpin + 'static { - type Item = io::Result; + type Item = io::Result; fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { let item = ready!(self.receiver.poll_next_unpin(cx)); diff --git a/transports/websocket/src/lib.rs b/transports/websocket/src/lib.rs index 4473ed65d73..e78a7b47a33 100644 --- a/transports/websocket/src/lib.rs +++ b/transports/websocket/src/lib.rs @@ -25,7 +25,7 @@ pub mod framed; pub mod tls; use error::Error; -use framed::Connection; +use framed::{Connection, Incoming}; use futures::{future::BoxFuture, prelude::*, stream::BoxStream, ready}; use libp2p_core::{ ConnectedPoint, @@ -157,8 +157,8 @@ where fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { loop { if let Some(item) = ready!(self.0.try_poll_next_unpin(cx)?) { - if item.is_data() { - return Poll::Ready(Some(Ok(item.into_bytes()))) + if let Incoming::Data(payload) = item { + return Poll::Ready(Some(Ok(payload.into_bytes()))) } } else { return Poll::Ready(None) From 22b3d6912572a48e4459d697569bed03063765ad Mon Sep 17 00:00:00 2001 From: David Date: Tue, 1 Jun 2021 22:55:21 +0200 Subject: [PATCH 08/12] Update transports/websocket/src/framed.rs Co-authored-by: Max Inden --- transports/websocket/src/framed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transports/websocket/src/framed.rs b/transports/websocket/src/framed.rs index 88f23547f22..fdcf7f1e85d 100644 --- a/transports/websocket/src/framed.rs +++ b/transports/websocket/src/framed.rs @@ -461,7 +461,7 @@ pub enum Incoming { /// Application data received over the websocket connection #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum Data { - /// Textual data. + /// UTF-8 encoded textual data. Text(Vec), /// Binary data. Binary(Vec) From 1c594157fb3f15cf6ff63f702b089fbf8c963ba5 Mon Sep 17 00:00:00 2001 From: David Palm Date: Tue, 19 Oct 2021 15:16:57 +0200 Subject: [PATCH 09/12] Add CHANGELOG entry --- transports/websocket/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/transports/websocket/CHANGELOG.md b/transports/websocket/CHANGELOG.md index 37d40248370..d7d249c9b0b 100644 --- a/transports/websocket/CHANGELOG.md +++ b/transports/websocket/CHANGELOG.md @@ -1,3 +1,8 @@ +# v0.32.0 + +- Handle websocket CLOSE with reason code. [PR 2085](https://github.com/libp2p/rust-libp2p/pull/2085) + + # 0.31.0-rc.1 [2021-10-15] - Make default features of `libp2p-core` optional. From 1a28536e69856fd93ead15fe89673e4635604a80 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Sat, 30 Oct 2021 11:41:56 +0200 Subject: [PATCH 10/12] transports/websocket: Bump version and adjust changelog entry --- transports/websocket/CHANGELOG.md | 5 +++-- transports/websocket/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/transports/websocket/CHANGELOG.md b/transports/websocket/CHANGELOG.md index d7d249c9b0b..ca561047866 100644 --- a/transports/websocket/CHANGELOG.md +++ b/transports/websocket/CHANGELOG.md @@ -1,7 +1,8 @@ -# v0.32.0 +# v0.32.0 [unreleased] -- Handle websocket CLOSE with reason code. [PR 2085](https://github.com/libp2p/rust-libp2p/pull/2085) +- Handle websocket CLOSE with reason code (see [PR 2085]). +[PR 2085]: https://github.com/libp2p/rust-libp2p/pull/2085 # 0.31.0-rc.1 [2021-10-15] diff --git a/transports/websocket/Cargo.toml b/transports/websocket/Cargo.toml index b4a11d3934e..b7c7f8b32dc 100644 --- a/transports/websocket/Cargo.toml +++ b/transports/websocket/Cargo.toml @@ -2,7 +2,7 @@ name = "libp2p-websocket" edition = "2018" description = "WebSocket transport for libp2p" -version = "0.31.0-rc.1" +version = "0.32.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" From 025c324fd6661b521d793d2e580707c15d31a451 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Sat, 30 Oct 2021 11:48:18 +0200 Subject: [PATCH 11/12] Cargo.toml: Bump websocket version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index fe41add1d34..61ca0b35cc7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -98,7 +98,7 @@ libp2p-deflate = { version = "0.30.0-rc.1", path = "transports/deflate", optiona libp2p-dns = { version = "0.30.0-rc.1", path = "transports/dns", optional = true, default-features = false } libp2p-mdns = { version = "0.32.0-rc.1", path = "protocols/mdns", optional = true } libp2p-tcp = { version = "0.30.0-rc.1", path = "transports/tcp", default-features = false, optional = true } -libp2p-websocket = { version = "0.31.0-rc.1", path = "transports/websocket", optional = true } +libp2p-websocket = { version = "0.32.0", path = "transports/websocket", optional = true } [dev-dependencies] async-std = { version = "1.6.2", features = ["attributes"] } From a8e24a2de0c48ebb9d365d019e74d373a3b3fb40 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Sat, 30 Oct 2021 12:05:17 +0200 Subject: [PATCH 12/12] Cargo.toml: Bump version --- CHANGELOG.md | 5 +++++ Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47ad9b610c1..2bbc2429a2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,11 @@ # `libp2p` facade crate +## Version 0.41.0 [unreleased] + +- Update individual crates. + - `libp2p-websocket` + ## Version 0.40.0-rc.3 [2021-10-27] - Update individual crates. diff --git a/Cargo.toml b/Cargo.toml index 61ca0b35cc7..9c9aedad01b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "libp2p" edition = "2018" description = "Peer-to-peer networking library" -version = "0.40.0-rc.3" +version = "0.41.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p"