Skip to content

Commit 8a4d7b9

Browse files
committed
Sync
1 parent 328c784 commit 8a4d7b9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

NativeLibs/yasio/yasio/bindings/yasio_ni.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ YASIO_NI_API void yasio_init_globals(void(YASIO_INTEROP_DECL* pfn)(int level, co
7878
YASIO_NI_API void yasio_cleanup_globals() { io_service::cleanup_globals(); }
7979

8080
struct yasio_io_event {
81-
int kind; //
82-
int channel;
83-
void* thandle;
81+
int kind; // event kind
82+
int channel; // channel index
83+
void* thandle; // transport
8484
union {
85-
void* msg;
86-
int status; //
85+
void* hmsg; // io_packet*
86+
int ec; // error code
8787
};
88-
void* user;
88+
void* user; // user data
8989
};
9090

9191
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
100100
event.thandle = e->transport();
101101
event.user = user;
102102
if (event.kind == yasio::YEK_ON_PACKET)
103-
event.msg = !is_packet_empty(pkt) ? &pkt : nullptr;
103+
event.hmsg = !is_packet_empty(pkt) ? &pkt : nullptr;
104104
else
105-
event.status = e->status();
105+
event.ec = e->status();
106106
event_cb(&event);
107107
});
108108
return service;

0 commit comments

Comments
 (0)