Skip to content

Commit 9687437

Browse files
author
Eric Reed
committed
added wrappers about uv_ip{4,6}_{port,name}
1 parent a7f92c9 commit 9687437

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/libstd/rt/uv/uvll.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,22 @@ pub unsafe fn free_ip6_addr(addr: *sockaddr_in6) {
339339
rust_uv_free_ip6_addr(addr);
340340
}
341341

342+
pub unsafe fn ip4_name(addr: *sockaddr_in, dst: *u8, size: size_t) -> c_int {
343+
return rust_uv_ip4_name(addr, dst, size);
344+
}
345+
346+
pub unsafe fn ip6_name(addr: *sockaddr_in6, dst: *u8, size: size_t) -> c_int {
347+
return rust_uv_ip6_name(addr, dst, size);
348+
}
349+
350+
pub unsafe fn ip4_port(addr: *sockaddr_in) -> c_uint {
351+
return rust_uv_ip4_port(addr);
352+
}
353+
354+
pub unsafe fn ip6_port(addr: *sockaddr_in6) -> c_uint {
355+
return rust_uv_ip6_port(addr);
356+
}
357+
342358
// data access helpers
343359
pub unsafe fn get_loop_for_uv_handle<T>(handle: *T) -> *c_void {
344360
return rust_uv_get_loop_for_uv_handle(handle as *c_void);

0 commit comments

Comments
 (0)