mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-03 21:07:39 +03:00
Extend io task contexts, for compio runtime compatibility (#404)
This commit is contained in:
parent
487faa3379
commit
75c892742c
15 changed files with 344 additions and 82 deletions
|
@ -1,5 +1,9 @@
|
|||
# Changes
|
||||
|
||||
## [2.1.0] - 2024-08-28
|
||||
|
||||
* Update io api usage
|
||||
|
||||
## [2.0.1] - 2024-08-26
|
||||
|
||||
* Fix rustls client/server filters
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "ntex-tls"
|
||||
version = "2.0.1"
|
||||
version = "2.1.0"
|
||||
authors = ["ntex contributors <team@ntex.rs>"]
|
||||
description = "An implementation of SSL streams for ntex backed by OpenSSL"
|
||||
keywords = ["network", "framework", "async", "futures"]
|
||||
|
@ -26,7 +26,7 @@ rustls = ["tls_rust"]
|
|||
|
||||
[dependencies]
|
||||
ntex-bytes = "0.1"
|
||||
ntex-io = "2"
|
||||
ntex-io = "2.3"
|
||||
ntex-util = "2"
|
||||
ntex-service = "3"
|
||||
ntex-net = "2"
|
||||
|
|
|
@ -248,7 +248,7 @@ async fn handle_result<T, F>(
|
|||
Ok(v) => Ok(Some(v)),
|
||||
Err(e) => match e.code() {
|
||||
ssl::ErrorCode::WANT_READ => {
|
||||
let res = io.force_read_ready().await;
|
||||
let res = io.read_notify().await;
|
||||
match res? {
|
||||
None => Err(io::Error::new(io::ErrorKind::Other, "disconnected")),
|
||||
_ => Ok(None),
|
||||
|
|
|
@ -164,7 +164,7 @@ impl TlsClientFilter {
|
|||
}
|
||||
poll_fn(|cx| {
|
||||
let read_ready = if wants_read {
|
||||
match ready!(io.poll_force_read_ready(cx))? {
|
||||
match ready!(io.poll_read_notify(cx))? {
|
||||
Some(_) => Ok(true),
|
||||
None => Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
|
|
|
@ -173,7 +173,7 @@ impl TlsServerFilter {
|
|||
}
|
||||
poll_fn(|cx| {
|
||||
let read_ready = if wants_read {
|
||||
match ready!(io.poll_force_read_ready(cx))? {
|
||||
match ready!(io.poll_read_notify(cx))? {
|
||||
Some(_) => Ok(true),
|
||||
None => Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue