summaryrefslogtreecommitdiff
path: root/ext/net
diff options
context:
space:
mode:
Diffstat (limited to 'ext/net')
-rw-r--r--ext/net/ops.rs12
-rw-r--r--ext/net/ops_unix.rs12
2 files changed, 12 insertions, 12 deletions
diff --git a/ext/net/ops.rs b/ext/net/ops.rs
index 942afc55f..5deaeb61e 100644
--- a/ext/net/ops.rs
+++ b/ext/net/ops.rs
@@ -8,7 +8,6 @@ use deno_core::error::bad_resource;
use deno_core::error::custom_error;
use deno_core::error::generic_error;
use deno_core::error::AnyError;
-use deno_core::op;
use deno_core::op2;
use deno_core::CancelFuture;
@@ -128,12 +127,13 @@ pub async fn op_net_recv_udp(
Ok((nread, IpAddr::from(remote_addr)))
}
-#[op]
-async fn op_net_send_udp<NP>(
+#[op2(async)]
+#[number]
+pub async fn op_net_send_udp<NP>(
state: Rc<RefCell<OpState>>,
- rid: ResourceId,
- addr: IpAddr,
- zero_copy: JsBuffer,
+ #[smi] rid: ResourceId,
+ #[serde] addr: IpAddr,
+ #[buffer] zero_copy: JsBuffer,
) -> Result<usize, AnyError>
where
NP: NetPermissions + 'static,
diff --git a/ext/net/ops_unix.rs b/ext/net/ops_unix.rs
index 1d20f2911..beb41bb4a 100644
--- a/ext/net/ops_unix.rs
+++ b/ext/net/ops_unix.rs
@@ -5,7 +5,6 @@ use crate::NetPermissions;
use deno_core::error::bad_resource;
use deno_core::error::custom_error;
use deno_core::error::AnyError;
-use deno_core::op;
use deno_core::op2;
use deno_core::AsyncRefCell;
use deno_core::CancelHandle;
@@ -159,12 +158,13 @@ pub async fn op_net_recv_unixpacket(
Ok((nread, path))
}
-#[op]
-async fn op_net_send_unixpacket<NP>(
+#[op2(async)]
+#[number]
+pub async fn op_net_send_unixpacket<NP>(
state: Rc<RefCell<OpState>>,
- rid: ResourceId,
- path: String,
- zero_copy: JsBuffer,
+ #[smi] rid: ResourceId,
+ #[string] path: String,
+ #[buffer] zero_copy: JsBuffer,
) -> Result<usize, AnyError>
where
NP: NetPermissions + 'static,