Update neon api usage

This commit is contained in:
Nikolay Kim 2025-03-31 15:56:57 +05:00
parent e1323b7eae
commit 73dee4d224
8 changed files with 9 additions and 8 deletions

View file

@ -46,6 +46,7 @@ ntex-compio = { path = "ntex-compio" }
ntex-tokio = { path = "ntex-tokio" }
ntex-neon = { git = "https://github.com/ntex-rs/neon.git" }
#ntex-neon = { path = "../dev/neon" }
[workspace.dependencies]
async-channel = "2"

View file

@ -1,6 +1,6 @@
[package]
name = "ntex-net"
version = "2.5.10"
version = "2.5.11"
authors = ["ntex contributors <team@ntex.rs>"]
description = "ntexwork utils for ntex framework"
keywords = ["network", "framework", "async", "futures"]
@ -40,7 +40,7 @@ ntex-util = "2.5"
ntex-tokio = { version = "0.5.3", optional = true }
ntex-compio = { version = "0.2.4", optional = true }
ntex-neon = { version = "0.1.15", optional = true }
ntex-neon = { version = "0.1.16", optional = true }
bitflags = { workspace = true }
cfg-if = { workspace = true }

View file

@ -34,7 +34,7 @@ impl ConnectOps {
pub(crate) fn current() -> Self {
Runtime::value(|rt| {
let mut inner = None;
rt.driver().register(|api| {
rt.register_handler(|api| {
let ops = Rc::new(ConnectOpsInner {
api,
connects: RefCell::new(Slab::new()),

View file

@ -52,7 +52,7 @@ impl<T: AsRawFd + 'static> StreamOps<T> {
pub(crate) fn current() -> Self {
Runtime::value(|rt| {
let mut inner = None;
rt.driver().register(|api| {
rt.register_handler(|api| {
let ops = Rc::new(StreamOpsInner {
api,
feed: RefCell::new(Vec::new()),

View file

@ -31,7 +31,7 @@ impl ConnectOps {
pub(crate) fn current() -> Self {
Runtime::value(|rt| {
let mut inner = None;
rt.driver().register(|api| {
rt.register_handler(|api| {
if !api.is_supported(opcode::Connect::CODE) {
panic!("opcode::Connect is required for io-uring support");
}

View file

@ -77,7 +77,7 @@ impl<T: os::fd::AsRawFd + 'static> StreamOps<T> {
pub(crate) fn current() -> Self {
Runtime::value(|rt| {
let mut inner = None;
rt.driver().register(|api| {
rt.register_handler(|api| {
if !api.is_supported(opcode::Recv::CODE) {
panic!("opcode::Recv is required for io-uring support");
}

View file

@ -42,4 +42,4 @@ tok-io = { version = "1", package = "tokio", default-features = false, features
"net",
], optional = true }
ntex-neon = { version = "0.1.14", optional = true }
ntex-neon = { version = "0.1.15", optional = true }

View file

@ -265,7 +265,7 @@ mod neon {
let rt = Runtime::new().unwrap();
log::info!(
"Starting neon runtime, driver {:?}",
rt.driver().tp().name()
rt.driver_type().name()
);
rt.block_on(fut);