Skip to content

Commit

Permalink
Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Feb 4, 2024
1 parent 328c784 commit 8a4d7b9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions NativeLibs/yasio/yasio/bindings/yasio_ni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down

0 comments on commit 8a4d7b9

Please sign in to comment.