Skip to content

Commit 74e7255

Browse files
author
Eric Reed
committed
Added a utility function to extract the udp handle from udp send requests.
1 parent 5393e43 commit 74e7255

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/rt/rust_uv.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,11 @@ rust_uv_udp_recv_stop(uv_udp_t* server) {
330330
return uv_udp_recv_stop(server);
331331
}
332332

333+
extern "C" uv_udp_t*
334+
rust_uv_get_udp_handle_from_send_req(uv_udp_send_t* send_req) {
335+
return send_req->handle;
336+
}
337+
333338
extern "C" int
334339
rust_uv_listen(uv_stream_t* stream, int backlog,
335340
uv_connection_cb cb) {

src/rt/rustrt.def.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ rust_uv_udp_send
111111
rust_uv_udp_send6
112112
rust_uv_udp_recv_start
113113
rust_uv_udp_recv_stop
114+
rust_uv_get_udp_handle_from_send_req
114115
rust_uv_listen
115116
rust_uv_accept
116117
rust_uv_write

0 commit comments

Comments
 (0)