From 4705f2a6288e643bac8dd2efe3bb04d6d25079c5 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 10 Aug 2021 21:10:33 +0600 Subject: [PATCH] Add Session::connection() method, return ref to Connection --- CHANGES.md | 6 ++++-- Cargo.toml | 2 +- src/session.rs | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3ac182c..06a64be 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,12 +1,14 @@ # Changes -## [0.5.0-b.3] - 2021-08-xx +## [0.5.0-b.3] - 2021-08-10 + +* Add Session::connection() method, returns ref to Connection * Add stream handling for transfer dispositions * Refactor sender link disposition handling -## [codec-0.6.1] - 2021-08-0x +## [codec-0.6.1] - 2021-08-10 * Regenerate spec with inlines diff --git a/Cargo.toml b/Cargo.toml index e966c95..4bcedaa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ frame-trace = [] [dependencies] ntex = "0.4.0-b.1" -ntex-amqp-codec = "0.6.0" +ntex-amqp-codec = "0.6.1" bitflags = "1.2" derive_more = "0.99" diff --git a/src/session.rs b/src/session.rs index 145db63..7df1959 100644 --- a/src/session.rs +++ b/src/session.rs @@ -35,6 +35,10 @@ impl Session { Session { inner } } + pub fn connection(&self) -> &Connection { + &self.inner.get_ref().sink + } + pub fn close(&self) -> impl Future> { Ready::Ok(()) }