From 24a0848a43a82089fdb9e8c6e9690b15d3f4e231 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 5 Aug 2022 05:02:39 +0800 Subject: [PATCH] add nonblocking flag to opcode map --- services/net/src/api.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/net/src/api.rs b/services/net/src/api.rs index ea356f089..4b68693aa 100644 --- a/services/net/src/api.rs +++ b/services/net/src/api.rs @@ -310,6 +310,8 @@ pub(crate) enum Opcode { /// =======|========= /// 0 | 0 indicating success /// 1 | Connection index + /// 2 | local port LSB (in case the specified port was 0) + /// 3 | local port MSB /// /// # Errors /// @@ -359,7 +361,11 @@ pub(crate) enum Opcode { StdTcpStreamShutdown = 46, LoopbackRx = 47, + + // do not use any numbers higher than 0x8000 as that is reserved for the nonblocking flag } +#[allow(dead_code)] +pub(crate) const NONBLOCKING_FLAG:usize = 0x8000; // when set, modulates a Peek or Read to be nonblocking #[derive(Debug, Archive, Serialize, Deserialize, Copy, Clone, Default)] pub(crate) struct SsidList {