From 8a4d7b9b1b80911456ca783fb34e3f99e8142acd Mon Sep 17 00:00:00 2001 From: halx99 Date: Sun, 4 Feb 2024 20:50:47 +0800 Subject: [PATCH] Sync --- NativeLibs/yasio/yasio/bindings/yasio_ni.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/NativeLibs/yasio/yasio/bindings/yasio_ni.cpp b/NativeLibs/yasio/yasio/bindings/yasio_ni.cpp index 94f32f5..3aaf65b 100644 --- a/NativeLibs/yasio/yasio/bindings/yasio_ni.cpp +++ b/NativeLibs/yasio/yasio/bindings/yasio_ni.cpp @@ -78,14 +78,14 @@ YASIO_NI_API void yasio_init_globals(void(YASIO_INTEROP_DECL* pfn)(int level, co YASIO_NI_API void yasio_cleanup_globals() { io_service::cleanup_globals(); } struct yasio_io_event { - int kind; // - int channel; - void* thandle; + int kind; // event kind + int channel; // channel index + void* thandle; // transport union { - void* msg; - int status; // + void* hmsg; // io_packet* + int ec; // error code }; - void* user; + void* user; // user data }; YASIO_NI_API void* yasio_create_service(int channel_count, void(YASIO_INTEROP_DECL* event_cb)(yasio_io_event* event), void* user) @@ -100,9 +100,9 @@ YASIO_NI_API void* yasio_create_service(int channel_count, void(YASIO_INTEROP_DE event.thandle = e->transport(); event.user = user; if (event.kind == yasio::YEK_ON_PACKET) - event.msg = !is_packet_empty(pkt) ? &pkt : nullptr; + event.hmsg = !is_packet_empty(pkt) ? &pkt : nullptr; else - event.status = e->status(); + event.ec = e->status(); event_cb(&event); }); return service;