(index<- ) ./libstd/rt/uv/uvll.rs
1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 /*!
12 * Low-level bindings to the libuv library.
13 *
14 * This module contains a set of direct, 'bare-metal' wrappers around
15 * the libuv C-API.
16 *
17 * We're not bothering yet to redefine uv's structs as Rust structs
18 * because they are quite large and change often between versions.
19 * The maintenance burden is just too high. Instead we use the uv's
20 * `uv_handle_size` and `uv_req_size` to find the correct size of the
21 * structs and allocate them on the heap. This can be revisited later.
22 *
23 * There are also a collection of helper functions to ease interacting
24 * with the low-level API.
25 *
26 * As new functionality, existent in uv.h, is added to the rust stdlib,
27 * the mappings should be added in this module.
28 */
29
30 #[allow(non_camel_case_types)]; // C types
31
32 use c_str::ToCStr;
33 use libc::{size_t, c_int, c_uint, c_void, c_char, uintptr_t};
34 use libc::ssize_t;
35 use libc::{malloc, free};
36 use libc;
37 use prelude::*;
38 use ptr;
39 use vec;
40
41 pub use self::errors::*;
42
43 pub static OK: c_int = 0;
44 pub static EOF: c_int = -4095;
45 pub static UNKNOWN: c_int = -4094;
46
47 // uv-errno.h redefines error codes for windows, but not for unix...
48
49 #[cfg(windows)]
50 pub mod errors {
51 use libc::c_int;
52
53 pub static EACCES: c_int = -4093;
54 pub static ECONNREFUSED: c_int = -4079;
55 pub static ECONNRESET: c_int = -4078;
56 pub static ENOTCONN: c_int = -4054;
57 pub static EPIPE: c_int = -4048;
58 }
59 #[cfg(not(windows))]
60 pub mod errors {
61 use libc;
62 use libc::c_int;
63
64 pub static EACCES: c_int = -libc::EACCES;
65 pub static ECONNREFUSED: c_int = -libc::ECONNREFUSED;
66 pub static ECONNRESET: c_int = -libc::ECONNRESET;
67 pub static ENOTCONN: c_int = -libc::ENOTCONN;
68 pub static EPIPE: c_int = -libc::EPIPE;
69 }
70
71 pub static PROCESS_SETUID: c_int = 1 << 0;
72 pub static PROCESS_SETGID: c_int = 1 << 1;
73 pub static PROCESS_WINDOWS_VERBATIM_ARGUMENTS: c_int = 1 << 2;
74 pub static PROCESS_DETACHED: c_int = 1 << 3;
75 pub static PROCESS_WINDOWS_HIDE: c_int = 1 << 4;
76
77 pub static STDIO_IGNORE: c_int = 0x00;
78 pub static STDIO_CREATE_PIPE: c_int = 0x01;
79 pub static STDIO_INHERIT_FD: c_int = 0x02;
80 pub static STDIO_INHERIT_STREAM: c_int = 0x04;
81 pub static STDIO_READABLE_PIPE: c_int = 0x10;
82 pub static STDIO_WRITABLE_PIPE: c_int = 0x20;
83
84 // see libuv/include/uv-unix.h
85 #[cfg(unix)]
86 pub struct uv_buf_t {
87 base: *u8,
88 len: libc::size_t,
89 }
90
91 // see libuv/include/uv-win.h
92 #[cfg(windows)]
93 pub struct uv_buf_t {
94 len: u32,
95 base: *u8,
96 }
97
98 pub struct uv_process_options_t {
99 exit_cb: uv_exit_cb,
100 file: *libc::c_char,
101 args: **libc::c_char,
102 env: **libc::c_char,
103 cwd: *libc::c_char,
104 flags: libc::c_uint,
105 stdio_count: libc::c_int,
106 stdio: *uv_stdio_container_t,
107 uid: uv_uid_t,
108 gid: uv_gid_t,
109 }
110
111 // These fields are private because they must be interfaced with through the
112 // functions below.
113 pub struct uv_stdio_container_t {
114 priv flags: libc::c_int,
115 priv stream: *uv_stream_t,
116 }
117
118 pub type uv_handle_t = c_void;
119 pub type uv_loop_t = c_void;
120 pub type uv_idle_t = c_void;
121 pub type uv_tcp_t = c_void;
122 pub type uv_udp_t = c_void;
123 pub type uv_connect_t = c_void;
124 pub type uv_connection_t = c_void;
125 pub type uv_write_t = c_void;
126 pub type uv_async_t = c_void;
127 pub type uv_timer_t = c_void;
128 pub type uv_stream_t = c_void;
129 pub type uv_fs_t = c_void;
130 pub type uv_udp_send_t = c_void;
131 pub type uv_getaddrinfo_t = c_void;
132 pub type uv_process_t = c_void;
133 pub type uv_pipe_t = c_void;
134
135 pub struct uv_timespec_t {
136 tv_sec: libc::c_long,
137 tv_nsec: libc::c_long
138 }
139
140 pub struct uv_stat_t {
141 st_dev: libc::uint64_t,
142 st_mode: libc::uint64_t,
143 st_nlink: libc::uint64_t,
144 st_uid: libc::uint64_t,
145 st_gid: libc::uint64_t,
146 st_rdev: libc::uint64_t,
147 st_ino: libc::uint64_t,
148 st_size: libc::uint64_t,
149 st_blksize: libc::uint64_t,
150 st_blocks: libc::uint64_t,
151 st_flags: libc::uint64_t,
152 st_gen: libc::uint64_t,
153 st_atim: uv_timespec_t,
154 st_mtim: uv_timespec_t,
155 st_ctim: uv_timespec_t,
156 st_birthtim: uv_timespec_t
157 }
158
159 impl uv_stat_t {
160 pub fn new() -> uv_stat_t {
161 uv_stat_t {
162 st_dev: 0,
163 st_mode: 0,
164 st_nlink: 0,
165 st_uid: 0,
166 st_gid: 0,
167 st_rdev: 0,
168 st_ino: 0,
169 st_size: 0,
170 st_blksize: 0,
171 st_blocks: 0,
172 st_flags: 0,
173 st_gen: 0,
174 st_atim: uv_timespec_t { tv_sec: 0, tv_nsec: 0 },
175 st_mtim: uv_timespec_t { tv_sec: 0, tv_nsec: 0 },
176 st_ctim: uv_timespec_t { tv_sec: 0, tv_nsec: 0 },
177 st_birthtim: uv_timespec_t { tv_sec: 0, tv_nsec: 0 }
178 }
179 }
180 pub fn is_file(&self) -> bool {
181 ((self.st_mode) & libc::S_IFMT as libc::uint64_t) == libc::S_IFREG as libc::uint64_t
182 }
183 pub fn is_dir(&self) -> bool {
184 ((self.st_mode) & libc::S_IFMT as libc::uint64_t) == libc::S_IFDIR as libc::uint64_t
185 }
186 }
187
188 pub type uv_idle_cb = extern "C" fn(handle: *uv_idle_t,
189 status: c_int);
190 pub type uv_alloc_cb = extern "C" fn(stream: *uv_stream_t,
191 suggested_size: size_t) -> uv_buf_t;
192 pub type uv_read_cb = extern "C" fn(stream: *uv_stream_t,
193 nread: ssize_t,
194 buf: uv_buf_t);
195 pub type uv_udp_send_cb = extern "C" fn(req: *uv_udp_send_t,
196 status: c_int);
197 pub type uv_udp_recv_cb = extern "C" fn(handle: *uv_udp_t,
198 nread: ssize_t,
199 buf: uv_buf_t,
200 addr: *sockaddr,
201 flags: c_uint);
202 pub type uv_close_cb = extern "C" fn(handle: *uv_handle_t);
203 pub type uv_walk_cb = extern "C" fn(handle: *uv_handle_t,
204 arg: *c_void);
205 pub type uv_async_cb = extern "C" fn(handle: *uv_async_t,
206 status: c_int);
207 pub type uv_connect_cb = extern "C" fn(handle: *uv_connect_t,
208 status: c_int);
209 pub type uv_connection_cb = extern "C" fn(handle: *uv_connection_t,
210 status: c_int);
211 pub type uv_timer_cb = extern "C" fn(handle: *uv_timer_t,
212 status: c_int);
213 pub type uv_write_cb = extern "C" fn(handle: *uv_write_t,
214 status: c_int);
215 pub type uv_getaddrinfo_cb = extern "C" fn(req: *uv_getaddrinfo_t,
216 status: c_int,
217 res: *addrinfo);
218 pub type uv_exit_cb = extern "C" fn(handle: *uv_process_t,
219 exit_status: c_int,
220 term_signal: c_int);
221
222 pub type sockaddr = c_void;
223 pub type sockaddr_in = c_void;
224 pub type sockaddr_in6 = c_void;
225 pub type sockaddr_storage = c_void;
226
227 #[cfg(unix)]
228 pub type socklen_t = c_int;
229
230 // XXX: This is a standard C type. Could probably be defined in libc
231 #[cfg(target_os = "android")]
232 #[cfg(target_os = "linux")]
233 pub struct addrinfo {
234 ai_flags: c_int,
235 ai_family: c_int,
236 ai_socktype: c_int,
237 ai_protocol: c_int,
238 ai_addrlen: socklen_t,
239 ai_addr: *sockaddr,
240 ai_canonname: *char,
241 ai_next: *addrinfo
242 }
243
244 #[cfg(target_os = "macos")]
245 #[cfg(target_os = "freebsd")]
246 pub struct addrinfo {
247 ai_flags: c_int,
248 ai_family: c_int,
249 ai_socktype: c_int,
250 ai_protocol: c_int,
251 ai_addrlen: socklen_t,
252 ai_canonname: *char,
253 ai_addr: *sockaddr,
254 ai_next: *addrinfo
255 }
256
257 #[cfg(windows)]
258 pub struct addrinfo {
259 ai_flags: c_int,
260 ai_family: c_int,
261 ai_socktype: c_int,
262 ai_protocol: c_int,
263 ai_addrlen: size_t,
264 ai_canonname: *char,
265 ai_addr: *sockaddr,
266 ai_next: *addrinfo
267 }
268
269 #[cfg(unix)] pub type uv_uid_t = libc::types::os::arch::posix88::uid_t;
270 #[cfg(unix)] pub type uv_gid_t = libc::types::os::arch::posix88::gid_t;
271 #[cfg(windows)] pub type uv_uid_t = libc::c_uchar;
272 #[cfg(windows)] pub type uv_gid_t = libc::c_uchar;
273
274 #[deriving(Eq)]
275 pub enum uv_handle_type {
276 UV_UNKNOWN_HANDLE,
277 UV_ASYNC,
278 UV_CHECK,
279 UV_FS_EVENT,
280 UV_FS_POLL,
281 UV_HANDLE,
282 UV_IDLE,
283 UV_NAMED_PIPE,
284 UV_POLL,
285 UV_PREPARE,
286 UV_PROCESS,
287 UV_STREAM,
288 UV_TCP,
289 UV_TIMER,
290 UV_TTY,
291 UV_UDP,
292 UV_SIGNAL,
293 UV_FILE,
294 UV_HANDLE_TYPE_MAX
295 }
296
297 #[cfg(unix)]
298 #[deriving(Eq)]
299 pub enum uv_req_type {
300 UV_UNKNOWN_REQ,
301 UV_REQ,
302 UV_CONNECT,
303 UV_WRITE,
304 UV_SHUTDOWN,
305 UV_UDP_SEND,
306 UV_FS,
307 UV_WORK,
308 UV_GETADDRINFO,
309 UV_REQ_TYPE_MAX
310 }
311
312 // uv_req_type may have additional fields defined by UV_REQ_TYPE_PRIVATE.
313 // See UV_REQ_TYPE_PRIVATE at libuv/include/uv-win.h
314 #[cfg(windows)]
315 #[deriving(Eq)]
316 pub enum uv_req_type {
317 UV_UNKNOWN_REQ,
318 UV_REQ,
319 UV_CONNECT,
320 UV_WRITE,
321 UV_SHUTDOWN,
322 UV_UDP_SEND,
323 UV_FS,
324 UV_WORK,
325 UV_GETADDRINFO,
326 UV_ACCEPT,
327 UV_FS_EVENT_REQ,
328 UV_POLL_REQ,
329 UV_PROCESS_EXIT,
330 UV_READ,
331 UV_UDP_RECV,
332 UV_WAKEUP,
333 UV_SIGNAL_REQ,
334 UV_REQ_TYPE_MAX
335 }
336
337 #[deriving(Eq)]
338 pub enum uv_membership {
339 UV_LEAVE_GROUP,
340 UV_JOIN_GROUP
341 }
342
343 pub unsafe fn malloc_handle(handle: uv_handle_type) -> *c_void {
344 #[fixed_stack_segment]; #[inline(never)];
345
346 assert!(handle != UV_UNKNOWN_HANDLE && handle != UV_HANDLE_TYPE_MAX);
347 let size = rust_uv_handle_size(handle as uint);
348 let p = malloc(size);
349 assert!(p.is_not_null());
350 return p;
351 }
352
353 pub unsafe fn free_handle(v: *c_void) {
354 #[fixed_stack_segment]; #[inline(never)];
355
356 free(v)
357 }
358
359 pub unsafe fn malloc_req(req: uv_req_type) -> *c_void {
360 #[fixed_stack_segment]; #[inline(never)];
361
362 assert!(req != UV_UNKNOWN_REQ && req != UV_REQ_TYPE_MAX);
363 let size = rust_uv_req_size(req as uint);
364 let p = malloc(size);
365 assert!(p.is_not_null());
366 return p;
367 }
368
369 pub unsafe fn free_req(v: *c_void) {
370 #[fixed_stack_segment]; #[inline(never)];
371
372 free(v)
373 }
374
375 #[test]
376 fn handle_sanity_check() {
377 #[fixed_stack_segment]; #[inline(never)];
378 unsafe {
379 assert_eq!(UV_HANDLE_TYPE_MAX as uint, rust_uv_handle_type_max());
380 }
381 }
382
383 #[test]
384 fn request_sanity_check() {
385 #[fixed_stack_segment]; #[inline(never)];
386 unsafe {
387 assert_eq!(UV_REQ_TYPE_MAX as uint, rust_uv_req_type_max());
388 }
389 }
390
391 // XXX Event loops ignore SIGPIPE by default.
392 pub unsafe fn loop_new() -> *c_void {
393 #[fixed_stack_segment]; #[inline(never)];
394
395 return rust_uv_loop_new();
396 }
397
398 pub unsafe fn loop_delete(loop_handle: *c_void) {
399 #[fixed_stack_segment]; #[inline(never)];
400
401 rust_uv_loop_delete(loop_handle);
402 }
403
404 pub unsafe fn run(loop_handle: *c_void) {
405 #[fixed_stack_segment]; #[inline(never)];
406
407 rust_uv_run(loop_handle);
408 }
409
410 pub unsafe fn close<T>(handle: *T, cb: uv_close_cb) {
411 #[fixed_stack_segment]; #[inline(never)];
412
413 rust_uv_close(handle as *c_void, cb);
414 }
415
416 pub unsafe fn walk(loop_handle: *c_void, cb: uv_walk_cb, arg: *c_void) {
417 #[fixed_stack_segment]; #[inline(never)];
418
419 rust_uv_walk(loop_handle, cb, arg);
420 }
421
422 pub unsafe fn idle_new() -> *uv_idle_t {
423 #[fixed_stack_segment]; #[inline(never)];
424
425 rust_uv_idle_new()
426 }
427
428 pub unsafe fn idle_delete(handle: *uv_idle_t) {
429 #[fixed_stack_segment]; #[inline(never)];
430
431 rust_uv_idle_delete(handle)
432 }
433
434 pub unsafe fn idle_init(loop_handle: *uv_loop_t, handle: *uv_idle_t) -> c_int {
435 #[fixed_stack_segment]; #[inline(never)];
436
437 rust_uv_idle_init(loop_handle, handle)
438 }
439
440 pub unsafe fn idle_start(handle: *uv_idle_t, cb: uv_idle_cb) -> c_int {
441 #[fixed_stack_segment]; #[inline(never)];
442
443 rust_uv_idle_start(handle, cb)
444 }
445
446 pub unsafe fn idle_stop(handle: *uv_idle_t) -> c_int {
447 #[fixed_stack_segment]; #[inline(never)];
448
449 rust_uv_idle_stop(handle)
450 }
451
452 pub unsafe fn udp_init(loop_handle: *uv_loop_t, handle: *uv_udp_t) -> c_int {
453 #[fixed_stack_segment]; #[inline(never)];
454
455 return rust_uv_udp_init(loop_handle, handle);
456 }
457
458 pub unsafe fn udp_bind(server: *uv_udp_t, addr: *sockaddr_in, flags: c_uint) -> c_int {
459 #[fixed_stack_segment]; #[inline(never)];
460
461 return rust_uv_udp_bind(server, addr, flags);
462 }
463
464 pub unsafe fn udp_bind6(server: *uv_udp_t, addr: *sockaddr_in6, flags: c_uint) -> c_int {
465 #[fixed_stack_segment]; #[inline(never)];
466
467 return rust_uv_udp_bind6(server, addr, flags);
468 }
469
470 pub unsafe fn udp_send<T>(req: *uv_udp_send_t, handle: *T, buf_in: &[uv_buf_t],
471 addr: *sockaddr_in, cb: uv_udp_send_cb) -> c_int {
472 #[fixed_stack_segment]; #[inline(never)];
473
474 let buf_ptr = vec::raw::to_ptr(buf_in);
475 let buf_cnt = buf_in.len() as i32;
476 return rust_uv_udp_send(req, handle as *c_void, buf_ptr, buf_cnt, addr, cb);
477 }
478
479 pub unsafe fn udp_send6<T>(req: *uv_udp_send_t, handle: *T, buf_in: &[uv_buf_t],
480 addr: *sockaddr_in6, cb: uv_udp_send_cb) -> c_int {
481 #[fixed_stack_segment]; #[inline(never)];
482
483 let buf_ptr = vec::raw::to_ptr(buf_in);
484 let buf_cnt = buf_in.len() as i32;
485 return rust_uv_udp_send6(req, handle as *c_void, buf_ptr, buf_cnt, addr, cb);
486 }
487
488 pub unsafe fn udp_recv_start(server: *uv_udp_t, on_alloc: uv_alloc_cb,
489 on_recv: uv_udp_recv_cb) -> c_int {
490 #[fixed_stack_segment]; #[inline(never)];
491
492 return rust_uv_udp_recv_start(server, on_alloc, on_recv);
493 }
494
495 pub unsafe fn udp_recv_stop(server: *uv_udp_t) -> c_int {
496 #[fixed_stack_segment]; #[inline(never)];
497
498 return rust_uv_udp_recv_stop(server);
499 }
500
501 pub unsafe fn get_udp_handle_from_send_req(send_req: *uv_udp_send_t) -> *uv_udp_t {
502 #[fixed_stack_segment]; #[inline(never)];
503
504 return rust_uv_get_udp_handle_from_send_req(send_req);
505 }
506
507 pub unsafe fn udp_getsockname(handle: *uv_udp_t, name: *sockaddr_storage) -> c_int {
508 #[fixed_stack_segment]; #[inline(never)];
509
510 return rust_uv_udp_getsockname(handle, name);
511 }
512
513 pub unsafe fn udp_set_membership(handle: *uv_udp_t, multicast_addr: *c_char,
514 interface_addr: *c_char, membership: uv_membership) -> c_int {
515 #[fixed_stack_segment]; #[inline(never)];
516
517 return rust_uv_udp_set_membership(handle, multicast_addr, interface_addr, membership as c_int);
518 }
519
520 pub unsafe fn udp_set_multicast_loop(handle: *uv_udp_t, on: c_int) -> c_int {
521 #[fixed_stack_segment]; #[inline(never)];
522
523 return rust_uv_udp_set_multicast_loop(handle, on);
524 }
525
526 pub unsafe fn udp_set_multicast_ttl(handle: *uv_udp_t, ttl: c_int) -> c_int {
527 #[fixed_stack_segment]; #[inline(never)];
528
529 return rust_uv_udp_set_multicast_ttl(handle, ttl);
530 }
531
532 pub unsafe fn udp_set_ttl(handle: *uv_udp_t, ttl: c_int) -> c_int {
533 #[fixed_stack_segment]; #[inline(never)];
534
535 return rust_uv_udp_set_ttl(handle, ttl);
536 }
537
538 pub unsafe fn udp_set_broadcast(handle: *uv_udp_t, on: c_int) -> c_int {
539 #[fixed_stack_segment]; #[inline(never)];
540
541 return rust_uv_udp_set_broadcast(handle, on);
542 }
543
544 pub unsafe fn tcp_init(loop_handle: *c_void, handle: *uv_tcp_t) -> c_int {
545 #[fixed_stack_segment]; #[inline(never)];
546
547 return rust_uv_tcp_init(loop_handle, handle);
548 }
549
550 pub unsafe fn tcp_connect(connect_ptr: *uv_connect_t, tcp_handle_ptr: *uv_tcp_t,
551 addr_ptr: *sockaddr_in, after_connect_cb: uv_connect_cb) -> c_int {
552 #[fixed_stack_segment]; #[inline(never)];
553
554 return rust_uv_tcp_connect(connect_ptr, tcp_handle_ptr, after_connect_cb, addr_ptr);
555 }
556
557 pub unsafe fn tcp_connect6(connect_ptr: *uv_connect_t, tcp_handle_ptr: *uv_tcp_t,
558 addr_ptr: *sockaddr_in6, after_connect_cb: uv_connect_cb) -> c_int {
559 #[fixed_stack_segment]; #[inline(never)];
560
561 return rust_uv_tcp_connect6(connect_ptr, tcp_handle_ptr, after_connect_cb, addr_ptr);
562 }
563
564 pub unsafe fn tcp_bind(tcp_server_ptr: *uv_tcp_t, addr_ptr: *sockaddr_in) -> c_int {
565 #[fixed_stack_segment]; #[inline(never)];
566
567 return rust_uv_tcp_bind(tcp_server_ptr, addr_ptr);
568 }
569
570 pub unsafe fn tcp_bind6(tcp_server_ptr: *uv_tcp_t, addr_ptr: *sockaddr_in6) -> c_int {
571 #[fixed_stack_segment]; #[inline(never)];
572
573 return rust_uv_tcp_bind6(tcp_server_ptr, addr_ptr);
574 }
575
576 pub unsafe fn tcp_getpeername(tcp_handle_ptr: *uv_tcp_t, name: *sockaddr_storage) -> c_int {
577 #[fixed_stack_segment]; #[inline(never)];
578
579 return rust_uv_tcp_getpeername(tcp_handle_ptr, name);
580 }
581
582 pub unsafe fn tcp_getsockname(handle: *uv_tcp_t, name: *sockaddr_storage) -> c_int {
583 #[fixed_stack_segment]; #[inline(never)];
584
585 return rust_uv_tcp_getsockname(handle, name);
586 }
587
588 pub unsafe fn tcp_nodelay(handle: *uv_tcp_t, enable: c_int) -> c_int {
589 #[fixed_stack_segment]; #[inline(never)];
590
591 return rust_uv_tcp_nodelay(handle, enable);
592 }
593
594 pub unsafe fn tcp_keepalive(handle: *uv_tcp_t, enable: c_int, delay: c_uint) -> c_int {
595 #[fixed_stack_segment]; #[inline(never)];
596
597 return rust_uv_tcp_keepalive(handle, enable, delay);
598 }
599
600 pub unsafe fn tcp_simultaneous_accepts(handle: *uv_tcp_t, enable: c_int) -> c_int {
601 #[fixed_stack_segment]; #[inline(never)];
602
603 return rust_uv_tcp_simultaneous_accepts(handle, enable);
604 }
605
606 pub unsafe fn listen<T>(stream: *T, backlog: c_int,
607 cb: uv_connection_cb) -> c_int {
608 #[fixed_stack_segment]; #[inline(never)];
609
610 return rust_uv_listen(stream as *c_void, backlog, cb);
611 }
612
613 pub unsafe fn accept(server: *c_void, client: *c_void) -> c_int {
614 #[fixed_stack_segment]; #[inline(never)];
615
616 return rust_uv_accept(server as *c_void, client as *c_void);
617 }
618
619 pub unsafe fn write<T>(req: *uv_write_t,
620 stream: *T,
621 buf_in: &[uv_buf_t],
622 cb: uv_write_cb) -> c_int {
623 #[fixed_stack_segment]; #[inline(never)];
624
625 let buf_ptr = vec::raw::to_ptr(buf_in);
626 let buf_cnt = buf_in.len() as i32;
627 return rust_uv_write(req as *c_void, stream as *c_void, buf_ptr, buf_cnt, cb);
628 }
629 pub unsafe fn read_start(stream: *uv_stream_t,
630 on_alloc: uv_alloc_cb,
631 on_read: uv_read_cb) -> c_int {
632 #[fixed_stack_segment]; #[inline(never)];
633
634 return rust_uv_read_start(stream as *c_void, on_alloc, on_read);
635 }
636
637 pub unsafe fn read_stop(stream: *uv_stream_t) -> c_int {
638 #[fixed_stack_segment]; #[inline(never)];
639
640 return rust_uv_read_stop(stream as *c_void);
641 }
642
643 pub unsafe fn strerror(err: c_int) -> *c_char {
644 #[fixed_stack_segment]; #[inline(never)];
645 return rust_uv_strerror(err);
646 }
647 pub unsafe fn err_name(err: c_int) -> *c_char {
648 #[fixed_stack_segment]; #[inline(never)];
649 return rust_uv_err_name(err);
650 }
651
652 pub unsafe fn async_init(loop_handle: *c_void,
653 async_handle: *uv_async_t,
654 cb: uv_async_cb) -> c_int {
655 #[fixed_stack_segment]; #[inline(never)];
656
657 return rust_uv_async_init(loop_handle, async_handle, cb);
658 }
659
660 pub unsafe fn async_send(async_handle: *uv_async_t) {
661 #[fixed_stack_segment]; #[inline(never)];
662
663 return rust_uv_async_send(async_handle);
664 }
665 pub unsafe fn buf_init(input: *u8, len: uint) -> uv_buf_t {
666 #[fixed_stack_segment]; #[inline(never)];
667
668 let out_buf = uv_buf_t { base: ptr::null(), len: 0 as size_t };
669 let out_buf_ptr = ptr::to_unsafe_ptr(&out_buf);
670 rust_uv_buf_init(out_buf_ptr, input, len as size_t);
671 return out_buf;
672 }
673
674 pub unsafe fn timer_init(loop_ptr: *c_void, timer_ptr: *uv_timer_t) -> c_int {
675 #[fixed_stack_segment]; #[inline(never)];
676
677 return rust_uv_timer_init(loop_ptr, timer_ptr);
678 }
679 pub unsafe fn timer_start(timer_ptr: *uv_timer_t,
680 cb: uv_timer_cb, timeout: u64,
681 repeat: u64) -> c_int {
682 #[fixed_stack_segment]; #[inline(never)];
683
684 return rust_uv_timer_start(timer_ptr, cb, timeout, repeat);
685 }
686 pub unsafe fn timer_stop(timer_ptr: *uv_timer_t) -> c_int {
687 #[fixed_stack_segment]; #[inline(never)];
688
689 return rust_uv_timer_stop(timer_ptr);
690 }
691
692 pub unsafe fn is_ip4_addr(addr: *sockaddr) -> bool {
693 #[fixed_stack_segment]; #[inline(never)];
694
695 match rust_uv_is_ipv4_sockaddr(addr) { 0 => false, _ => true }
696 }
697
698 pub unsafe fn is_ip6_addr(addr: *sockaddr) -> bool {
699 #[fixed_stack_segment]; #[inline(never)];
700
701 match rust_uv_is_ipv6_sockaddr(addr) { 0 => false, _ => true }
702 }
703
704 pub unsafe fn malloc_ip4_addr(ip: &str, port: int) -> *sockaddr_in {
705 #[fixed_stack_segment]; #[inline(never)];
706 do ip.with_c_str |ip_buf| {
707 rust_uv_ip4_addrp(ip_buf as *u8, port as libc::c_int)
708 }
709 }
710 pub unsafe fn malloc_ip6_addr(ip: &str, port: int) -> *sockaddr_in6 {
711 #[fixed_stack_segment]; #[inline(never)];
712 do ip.with_c_str |ip_buf| {
713 rust_uv_ip6_addrp(ip_buf as *u8, port as libc::c_int)
714 }
715 }
716
717 pub unsafe fn malloc_sockaddr_storage() -> *sockaddr_storage {
718 #[fixed_stack_segment]; #[inline(never)];
719
720 rust_uv_malloc_sockaddr_storage()
721 }
722
723 pub unsafe fn free_sockaddr_storage(ss: *sockaddr_storage) {
724 #[fixed_stack_segment]; #[inline(never)];
725
726 rust_uv_free_sockaddr_storage(ss);
727 }
728
729 pub unsafe fn free_ip4_addr(addr: *sockaddr_in) {
730 #[fixed_stack_segment]; #[inline(never)];
731
732 rust_uv_free_ip4_addr(addr);
733 }
734
735 pub unsafe fn free_ip6_addr(addr: *sockaddr_in6) {
736 #[fixed_stack_segment]; #[inline(never)];
737
738 rust_uv_free_ip6_addr(addr);
739 }
740
741 pub unsafe fn ip4_name(addr: *sockaddr_in, dst: *u8, size: size_t) -> c_int {
742 #[fixed_stack_segment]; #[inline(never)];
743
744 return rust_uv_ip4_name(addr, dst, size);
745 }
746
747 pub unsafe fn ip6_name(addr: *sockaddr_in6, dst: *u8, size: size_t) -> c_int {
748 #[fixed_stack_segment]; #[inline(never)];
749
750 return rust_uv_ip6_name(addr, dst, size);
751 }
752
753 pub unsafe fn ip4_port(addr: *sockaddr_in) -> c_uint {
754 #[fixed_stack_segment]; #[inline(never)];
755
756 return rust_uv_ip4_port(addr);
757 }
758
759 pub unsafe fn ip6_port(addr: *sockaddr_in6) -> c_uint {
760 #[fixed_stack_segment]; #[inline(never)];
761
762 return rust_uv_ip6_port(addr);
763 }
764
765 pub unsafe fn fs_open(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, flags: int, mode: int,
766 cb: *u8) -> c_int {
767 #[fixed_stack_segment]; #[inline(never)];
768
769 rust_uv_fs_open(loop_ptr, req, path, flags as c_int, mode as c_int, cb)
770 }
771
772 pub unsafe fn fs_unlink(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
773 cb: *u8) -> c_int {
774 #[fixed_stack_segment]; #[inline(never)];
775
776 rust_uv_fs_unlink(loop_ptr, req, path, cb)
777 }
778 pub unsafe fn fs_write(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int, buf: *c_void,
779 len: uint, offset: i64, cb: *u8) -> c_int {
780 #[fixed_stack_segment]; #[inline(never)];
781
782 rust_uv_fs_write(loop_ptr, req, fd, buf, len as c_uint, offset, cb)
783 }
784 pub unsafe fn fs_read(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int, buf: *c_void,
785 len: uint, offset: i64, cb: *u8) -> c_int {
786 #[fixed_stack_segment]; #[inline(never)];
787
788 rust_uv_fs_read(loop_ptr, req, fd, buf, len as c_uint, offset, cb)
789 }
790 pub unsafe fn fs_close(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int,
791 cb: *u8) -> c_int {
792 #[fixed_stack_segment]; #[inline(never)];
793
794 rust_uv_fs_close(loop_ptr, req, fd, cb)
795 }
796 pub unsafe fn fs_stat(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, cb: *u8) -> c_int {
797 #[fixed_stack_segment]; #[inline(never)];
798
799 rust_uv_fs_stat(loop_ptr, req, path, cb)
800 }
801 pub unsafe fn fs_fstat(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int, cb: *u8) -> c_int {
802 #[fixed_stack_segment]; #[inline(never)];
803
804 rust_uv_fs_fstat(loop_ptr, req, fd, cb)
805 }
806 pub unsafe fn fs_mkdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, mode: int,
807 cb: *u8) -> c_int {
808 #[fixed_stack_segment]; #[inline(never)];
809
810 rust_uv_fs_mkdir(loop_ptr, req, path, mode as c_int, cb)
811 }
812 pub unsafe fn fs_rmdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
813 cb: *u8) -> c_int {
814 #[fixed_stack_segment]; #[inline(never)];
815
816 rust_uv_fs_rmdir(loop_ptr, req, path, cb)
817 }
818 pub unsafe fn fs_readdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
819 flags: c_int, cb: *u8) -> c_int {
820 #[fixed_stack_segment]; #[inline(never)];
821
822 rust_uv_fs_readdir(loop_ptr, req, path, flags, cb)
823 }
824 pub unsafe fn populate_stat(req_in: *uv_fs_t, stat_out: *uv_stat_t) {
825 #[fixed_stack_segment]; #[inline(never)];
826
827 rust_uv_populate_uv_stat(req_in, stat_out)
828 }
829 pub unsafe fn fs_req_cleanup(req: *uv_fs_t) {
830 #[fixed_stack_segment]; #[inline(never)];
831
832 rust_uv_fs_req_cleanup(req);
833 }
834
835 pub unsafe fn spawn(loop_ptr: *c_void, result: *uv_process_t,
836 options: uv_process_options_t) -> c_int {
837 #[fixed_stack_segment]; #[inline(never)];
838 return rust_uv_spawn(loop_ptr, result, options);
839 }
840
841 pub unsafe fn process_kill(p: *uv_process_t, signum: c_int) -> c_int {
842 #[fixed_stack_segment]; #[inline(never)];
843 return rust_uv_process_kill(p, signum);
844 }
845
846 pub unsafe fn process_pid(p: *uv_process_t) -> c_int {
847 #[fixed_stack_segment]; #[inline(never)];
848 return rust_uv_process_pid(p);
849 }
850
851 pub unsafe fn set_stdio_container_flags(c: *uv_stdio_container_t,
852 flags: libc::c_int) {
853 #[fixed_stack_segment]; #[inline(never)];
854 rust_set_stdio_container_flags(c, flags);
855 }
856
857 pub unsafe fn set_stdio_container_fd(c: *uv_stdio_container_t,
858 fd: libc::c_int) {
859 #[fixed_stack_segment]; #[inline(never)];
860 rust_set_stdio_container_fd(c, fd);
861 }
862
863 pub unsafe fn set_stdio_container_stream(c: *uv_stdio_container_t,
864 stream: *uv_stream_t) {
865 #[fixed_stack_segment]; #[inline(never)];
866 rust_set_stdio_container_stream(c, stream);
867 }
868
869 pub unsafe fn pipe_init(loop_ptr: *c_void, p: *uv_pipe_t, ipc: c_int) -> c_int {
870 #[fixed_stack_segment]; #[inline(never)];
871 rust_uv_pipe_init(loop_ptr, p, ipc)
872 }
873
874 // data access helpers
875 pub unsafe fn get_result_from_fs_req(req: *uv_fs_t) -> c_int {
876 #[fixed_stack_segment]; #[inline(never)];
877
878 rust_uv_get_result_from_fs_req(req)
879 }
880 pub unsafe fn get_ptr_from_fs_req(req: *uv_fs_t) -> *libc::c_void {
881 #[fixed_stack_segment]; #[inline(never)];
882
883 rust_uv_get_ptr_from_fs_req(req)
884 }
885 pub unsafe fn get_loop_from_fs_req(req: *uv_fs_t) -> *uv_loop_t {
886 #[fixed_stack_segment]; #[inline(never)];
887
888 rust_uv_get_loop_from_fs_req(req)
889 }
890 pub unsafe fn get_loop_from_getaddrinfo_req(req: *uv_getaddrinfo_t) -> *uv_loop_t {
891 #[fixed_stack_segment]; #[inline(never)];
892
893 rust_uv_get_loop_from_getaddrinfo_req(req)
894 }
895 pub unsafe fn get_loop_for_uv_handle<T>(handle: *T) -> *c_void {
896 #[fixed_stack_segment]; #[inline(never)];
897
898 return rust_uv_get_loop_for_uv_handle(handle as *c_void);
899 }
900 pub unsafe fn get_stream_handle_from_connect_req(connect: *uv_connect_t) -> *uv_stream_t {
901 #[fixed_stack_segment]; #[inline(never)];
902
903 return rust_uv_get_stream_handle_from_connect_req(connect);
904 }
905 pub unsafe fn get_stream_handle_from_write_req(write_req: *uv_write_t) -> *uv_stream_t {
906 #[fixed_stack_segment]; #[inline(never)];
907
908 return rust_uv_get_stream_handle_from_write_req(write_req);
909 }
910 pub unsafe fn get_data_for_uv_loop(loop_ptr: *c_void) -> *c_void {
911 #[fixed_stack_segment]; #[inline(never)];
912
913 rust_uv_get_data_for_uv_loop(loop_ptr)
914 }
915 pub unsafe fn set_data_for_uv_loop(loop_ptr: *c_void, data: *c_void) {
916 #[fixed_stack_segment]; #[inline(never)];
917
918 rust_uv_set_data_for_uv_loop(loop_ptr, data);
919 }
920 pub unsafe fn get_data_for_uv_handle<T>(handle: *T) -> *c_void {
921 #[fixed_stack_segment]; #[inline(never)];
922
923 return rust_uv_get_data_for_uv_handle(handle as *c_void);
924 }
925 pub unsafe fn set_data_for_uv_handle<T, U>(handle: *T, data: *U) {
926 #[fixed_stack_segment]; #[inline(never)];
927
928 rust_uv_set_data_for_uv_handle(handle as *c_void, data as *c_void);
929 }
930 pub unsafe fn get_data_for_req<T>(req: *T) -> *c_void {
931 #[fixed_stack_segment]; #[inline(never)];
932
933 return rust_uv_get_data_for_req(req as *c_void);
934 }
935 pub unsafe fn set_data_for_req<T, U>(req: *T, data: *U) {
936 #[fixed_stack_segment]; #[inline(never)];
937
938 rust_uv_set_data_for_req(req as *c_void, data as *c_void);
939 }
940 pub unsafe fn get_base_from_buf(buf: uv_buf_t) -> *u8 {
941 #[fixed_stack_segment]; #[inline(never)];
942
943 return rust_uv_get_base_from_buf(buf);
944 }
945 pub unsafe fn get_len_from_buf(buf: uv_buf_t) -> size_t {
946 #[fixed_stack_segment]; #[inline(never)];
947
948 return rust_uv_get_len_from_buf(buf);
949 }
950 pub unsafe fn getaddrinfo(loop_: *uv_loop_t, req: *uv_getaddrinfo_t,
951 getaddrinfo_cb: uv_getaddrinfo_cb,
952 node: *c_char, service: *c_char,
953 hints: *addrinfo) -> c_int {
954 #[fixed_stack_segment]; #[inline(never)];
955 return rust_uv_getaddrinfo(loop_, req, getaddrinfo_cb, node, service, hints);
956 }
957 pub unsafe fn freeaddrinfo(ai: *addrinfo) {
958 #[fixed_stack_segment]; #[inline(never)];
959 rust_uv_freeaddrinfo(ai);
960 }
961
962 pub struct uv_err_data {
963 err_name: ~str,
964 err_msg: ~str,
965 }
966
967 extern {
968
969 fn rust_uv_handle_size(type_: uintptr_t) -> size_t;
970 fn rust_uv_req_size(type_: uintptr_t) -> size_t;
971 fn rust_uv_handle_type_max() -> uintptr_t;
972 fn rust_uv_req_type_max() -> uintptr_t;
973
974 // libuv public API
975 fn rust_uv_loop_new() -> *c_void;
976 fn rust_uv_loop_delete(lp: *c_void);
977 fn rust_uv_run(loop_handle: *c_void);
978 fn rust_uv_close(handle: *c_void, cb: uv_close_cb);
979 fn rust_uv_walk(loop_handle: *c_void, cb: uv_walk_cb, arg: *c_void);
980
981 fn rust_uv_idle_new() -> *uv_idle_t;
982 fn rust_uv_idle_delete(handle: *uv_idle_t);
983 fn rust_uv_idle_init(loop_handle: *uv_loop_t, handle: *uv_idle_t) -> c_int;
984 fn rust_uv_idle_start(handle: *uv_idle_t, cb: uv_idle_cb) -> c_int;
985 fn rust_uv_idle_stop(handle: *uv_idle_t) -> c_int;
986
987 fn rust_uv_async_send(handle: *uv_async_t);
988 fn rust_uv_async_init(loop_handle: *c_void,
989 async_handle: *uv_async_t,
990 cb: uv_async_cb) -> c_int;
991 fn rust_uv_tcp_init(loop_handle: *c_void, handle_ptr: *uv_tcp_t) -> c_int;
992 fn rust_uv_buf_init(out_buf: *uv_buf_t, base: *u8, len: size_t);
993 fn rust_uv_strerror(err: c_int) -> *c_char;
994 fn rust_uv_err_name(err: c_int) -> *c_char;
995 fn rust_uv_ip4_addrp(ip: *u8, port: c_int) -> *sockaddr_in;
996 fn rust_uv_ip6_addrp(ip: *u8, port: c_int) -> *sockaddr_in6;
997 fn rust_uv_free_ip4_addr(addr: *sockaddr_in);
998 fn rust_uv_free_ip6_addr(addr: *sockaddr_in6);
999 fn rust_uv_ip4_name(src: *sockaddr_in, dst: *u8, size: size_t) -> c_int;
1000 fn rust_uv_ip6_name(src: *sockaddr_in6, dst: *u8, size: size_t) -> c_int;
1001 fn rust_uv_ip4_port(src: *sockaddr_in) -> c_uint;
1002 fn rust_uv_ip6_port(src: *sockaddr_in6) -> c_uint;
1003 fn rust_uv_tcp_connect(req: *uv_connect_t, handle: *uv_tcp_t,
1004 cb: uv_connect_cb,
1005 addr: *sockaddr_in) -> c_int;
1006 fn rust_uv_tcp_bind(tcp_server: *uv_tcp_t, addr: *sockaddr_in) -> c_int;
1007 fn rust_uv_tcp_connect6(req: *uv_connect_t, handle: *uv_tcp_t,
1008 cb: uv_connect_cb,
1009 addr: *sockaddr_in6) -> c_int;
1010 fn rust_uv_tcp_bind6(tcp_server: *uv_tcp_t, addr: *sockaddr_in6) -> c_int;
1011 fn rust_uv_tcp_getpeername(tcp_handle_ptr: *uv_tcp_t, name: *sockaddr_storage) -> c_int;
1012 fn rust_uv_tcp_getsockname(handle: *uv_tcp_t, name: *sockaddr_storage) -> c_int;
1013 fn rust_uv_tcp_nodelay(handle: *uv_tcp_t, enable: c_int) -> c_int;
1014 fn rust_uv_tcp_keepalive(handle: *uv_tcp_t, enable: c_int, delay: c_uint) -> c_int;
1015 fn rust_uv_tcp_simultaneous_accepts(handle: *uv_tcp_t, enable: c_int) -> c_int;
1016
1017 fn rust_uv_udp_init(loop_handle: *uv_loop_t, handle_ptr: *uv_udp_t) -> c_int;
1018 fn rust_uv_udp_bind(server: *uv_udp_t, addr: *sockaddr_in, flags: c_uint) -> c_int;
1019 fn rust_uv_udp_bind6(server: *uv_udp_t, addr: *sockaddr_in6, flags: c_uint) -> c_int;
1020 fn rust_uv_udp_send(req: *uv_udp_send_t, handle: *uv_udp_t, buf_in: *uv_buf_t,
1021 buf_cnt: c_int, addr: *sockaddr_in, cb: uv_udp_send_cb) -> c_int;
1022 fn rust_uv_udp_send6(req: *uv_udp_send_t, handle: *uv_udp_t, buf_in: *uv_buf_t,
1023 buf_cnt: c_int, addr: *sockaddr_in6, cb: uv_udp_send_cb) -> c_int;
1024 fn rust_uv_udp_recv_start(server: *uv_udp_t,
1025 on_alloc: uv_alloc_cb,
1026 on_recv: uv_udp_recv_cb) -> c_int;
1027 fn rust_uv_udp_recv_stop(server: *uv_udp_t) -> c_int;
1028 fn rust_uv_get_udp_handle_from_send_req(req: *uv_udp_send_t) -> *uv_udp_t;
1029 fn rust_uv_udp_getsockname(handle: *uv_udp_t, name: *sockaddr_storage) -> c_int;
1030 fn rust_uv_udp_set_membership(handle: *uv_udp_t, multicast_addr: *c_char,
1031 interface_addr: *c_char, membership: c_int) -> c_int;
1032 fn rust_uv_udp_set_multicast_loop(handle: *uv_udp_t, on: c_int) -> c_int;
1033 fn rust_uv_udp_set_multicast_ttl(handle: *uv_udp_t, ttl: c_int) -> c_int;
1034 fn rust_uv_udp_set_ttl(handle: *uv_udp_t, ttl: c_int) -> c_int;
1035 fn rust_uv_udp_set_broadcast(handle: *uv_udp_t, on: c_int) -> c_int;
1036
1037 fn rust_uv_is_ipv4_sockaddr(addr: *sockaddr) -> c_int;
1038 fn rust_uv_is_ipv6_sockaddr(addr: *sockaddr) -> c_int;
1039 fn rust_uv_malloc_sockaddr_storage() -> *sockaddr_storage;
1040 fn rust_uv_free_sockaddr_storage(ss: *sockaddr_storage);
1041
1042 fn rust_uv_listen(stream: *c_void, backlog: c_int,
1043 cb: uv_connection_cb) -> c_int;
1044 fn rust_uv_accept(server: *c_void, client: *c_void) -> c_int;
1045 fn rust_uv_write(req: *c_void, stream: *c_void, buf_in: *uv_buf_t, buf_cnt: c_int,
1046 cb: uv_write_cb) -> c_int;
1047 fn rust_uv_read_start(stream: *c_void,
1048 on_alloc: uv_alloc_cb,
1049 on_read: uv_read_cb) -> c_int;
1050 fn rust_uv_read_stop(stream: *c_void) -> c_int;
1051 fn rust_uv_timer_init(loop_handle: *c_void, timer_handle: *uv_timer_t) -> c_int;
1052 fn rust_uv_timer_start(timer_handle: *uv_timer_t, cb: uv_timer_cb, timeout: libc::uint64_t,
1053 repeat: libc::uint64_t) -> c_int;
1054 fn rust_uv_timer_stop(handle: *uv_timer_t) -> c_int;
1055 fn rust_uv_fs_open(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char,
1056 flags: c_int, mode: c_int, cb: *u8) -> c_int;
1057 fn rust_uv_fs_unlink(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char,
1058 cb: *u8) -> c_int;
1059 fn rust_uv_fs_write(loop_ptr: *c_void, req: *uv_fs_t, fd: c_int,
1060 buf: *c_void, len: c_uint, offset: i64, cb: *u8) -> c_int;
1061 fn rust_uv_fs_read(loop_ptr: *c_void, req: *uv_fs_t, fd: c_int,
1062 buf: *c_void, len: c_uint, offset: i64, cb: *u8) -> c_int;
1063 fn rust_uv_fs_close(loop_ptr: *c_void, req: *uv_fs_t, fd: c_int,
1064 cb: *u8) -> c_int;
1065 fn rust_uv_fs_stat(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char, cb: *u8) -> c_int;
1066 fn rust_uv_fs_fstat(loop_ptr: *c_void, req: *uv_fs_t, fd: c_int, cb: *u8) -> c_int;
1067 fn rust_uv_fs_mkdir(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char,
1068 mode: c_int, cb: *u8) -> c_int;
1069 fn rust_uv_fs_rmdir(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char,
1070 cb: *u8) -> c_int;
1071 fn rust_uv_fs_readdir(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char,
1072 flags: c_int, cb: *u8) -> c_int;
1073 fn rust_uv_fs_req_cleanup(req: *uv_fs_t);
1074 fn rust_uv_populate_uv_stat(req_in: *uv_fs_t, stat_out: *uv_stat_t);
1075 fn rust_uv_get_result_from_fs_req(req: *uv_fs_t) -> c_int;
1076 fn rust_uv_get_ptr_from_fs_req(req: *uv_fs_t) -> *libc::c_void;
1077 fn rust_uv_get_loop_from_fs_req(req: *uv_fs_t) -> *uv_loop_t;
1078 fn rust_uv_get_loop_from_getaddrinfo_req(req: *uv_fs_t) -> *uv_loop_t;
1079
1080 fn rust_uv_get_stream_handle_from_connect_req(connect_req: *uv_connect_t) -> *uv_stream_t;
1081 fn rust_uv_get_stream_handle_from_write_req(write_req: *uv_write_t) -> *uv_stream_t;
1082 fn rust_uv_get_loop_for_uv_handle(handle: *c_void) -> *c_void;
1083 fn rust_uv_get_data_for_uv_loop(loop_ptr: *c_void) -> *c_void;
1084 fn rust_uv_set_data_for_uv_loop(loop_ptr: *c_void, data: *c_void);
1085 fn rust_uv_get_data_for_uv_handle(handle: *c_void) -> *c_void;
1086 fn rust_uv_set_data_for_uv_handle(handle: *c_void, data: *c_void);
1087 fn rust_uv_get_data_for_req(req: *c_void) -> *c_void;
1088 fn rust_uv_set_data_for_req(req: *c_void, data: *c_void);
1089 fn rust_uv_get_base_from_buf(buf: uv_buf_t) -> *u8;
1090 fn rust_uv_get_len_from_buf(buf: uv_buf_t) -> size_t;
1091 fn rust_uv_getaddrinfo(loop_: *uv_loop_t, req: *uv_getaddrinfo_t,
1092 getaddrinfo_cb: uv_getaddrinfo_cb,
1093 node: *c_char, service: *c_char,
1094 hints: *addrinfo) -> c_int;
1095 fn rust_uv_freeaddrinfo(ai: *addrinfo);
1096 fn rust_uv_spawn(loop_ptr: *c_void, outptr: *uv_process_t,
1097 options: uv_process_options_t) -> c_int;
1098 fn rust_uv_process_kill(p: *uv_process_t, signum: c_int) -> c_int;
1099 fn rust_uv_process_pid(p: *uv_process_t) -> c_int;
1100 fn rust_set_stdio_container_flags(c: *uv_stdio_container_t, flags: c_int);
1101 fn rust_set_stdio_container_fd(c: *uv_stdio_container_t, fd: c_int);
1102 fn rust_set_stdio_container_stream(c: *uv_stdio_container_t,
1103 stream: *uv_stream_t);
1104 fn rust_uv_pipe_init(loop_ptr: *c_void, p: *uv_pipe_t, ipc: c_int) -> c_int;
1105 }
libstd/rt/uv/uvll.rs:563:1-563:1 -fn- definition:
pub unsafe fn tcp_bind(tcp_server_ptr: *uv_tcp_t, addr_ptr: *sockaddr_in) -> c_int {
references:-libstd/rt/uv/net.rs:
263: UvIpv4SocketAddr(addr) => uvll::tcp_bind(self.native_handle(), addr),
libstd/rt/uv/uvll.rs:478:1-478:1 -fn- definition:
pub unsafe fn udp_send6<T>(req: *uv_udp_send_t, handle: *T, buf_in: &[uv_buf_t],
references:-libstd/rt/uv/net.rs:
420: UvIpv6SocketAddr(addr) => uvll::udp_send6(req.native_handle(),
libstd/rt/uv/uvll.rs:123:32-123:32 -ty- definition:
pub type uv_connect_t = c_void;
pub type uv_connection_t = c_void;
references:-209: pub type uv_connection_cb = extern "C" fn(handle: *uv_connection_t,
libstd/rt/uv/uvll.rs:469:1-469:1 -fn- definition:
pub unsafe fn udp_send<T>(req: *uv_udp_send_t, handle: *T, buf_in: &[uv_buf_t],
references:-libstd/rt/uv/net.rs:
418: UvIpv4SocketAddr(addr) => uvll::udp_send(req.native_handle(),
libstd/rt/uv/uvll.rs:862:1-862:1 -fn- definition:
pub unsafe fn set_stdio_container_stream(c: *uv_stdio_container_t,
references:-libstd/rt/uv/process.rs:
168: uvll::set_stdio_container_stream(dst, handle);
libstd/rt/uv/uvll.rs:403:1-403:1 -fn- definition:
pub unsafe fn run(loop_handle: *c_void) {
references:-libstd/rt/uv/mod.rs:
110: unsafe { uvll::run(self.native_handle()) };
libstd/rt/uv/uvll.rs:85:13-85:13 -struct- definition:
#[cfg(unix)]
pub struct uv_buf_t {
references:-945: pub unsafe fn get_len_from_buf(buf: uv_buf_t) -> size_t {
1090: fn rust_uv_get_len_from_buf(buf: uv_buf_t) -> size_t;
1022: fn rust_uv_udp_send6(req: *uv_udp_send_t, handle: *uv_udp_t, buf_in: *uv_buf_t,
940: pub unsafe fn get_base_from_buf(buf: uv_buf_t) -> *u8 {
479: pub unsafe fn udp_send6<T>(req: *uv_udp_send_t, handle: *T, buf_in: &[uv_buf_t],
665: pub unsafe fn buf_init(input: *u8, len: uint) -> uv_buf_t {
1089: fn rust_uv_get_base_from_buf(buf: uv_buf_t) -> *u8;
1020: fn rust_uv_udp_send(req: *uv_udp_send_t, handle: *uv_udp_t, buf_in: *uv_buf_t,
194: buf: uv_buf_t);
621: buf_in: &[uv_buf_t],
992: fn rust_uv_buf_init(out_buf: *uv_buf_t, base: *u8, len: size_t);
191: suggested_size: size_t) -> uv_buf_t;
199: buf: uv_buf_t,
668: let out_buf = uv_buf_t { base: ptr::null(), len: 0 as size_t };
1045: fn rust_uv_write(req: *c_void, stream: *c_void, buf_in: *uv_buf_t, buf_cnt: c_int,
470: pub unsafe fn udp_send<T>(req: *uv_udp_send_t, handle: *T, buf_in: &[uv_buf_t],
libstd/rt/uv/mod.rs:
298: pub type Buf = uvll::uv_buf_t;
libstd/rt/uv/uvll.rs:618:1-618:1 -fn- definition:
pub unsafe fn write<T>(req: *uv_write_t,
references:-libstd/rt/uv/net.rs:
196: assert_eq!(0, uvll::write(req.native_handle(), self.native_handle(), [buf], write_cb));
libstd/rt/uv/uvll.rs:628:2-628:2 -fn- definition:
}
pub unsafe fn read_start(stream: *uv_stream_t,
references:-libstd/rt/uv/net.rs:
150: let ret = unsafe { uvll::read_start(self.native_handle(), alloc_cb, read_cb) };
libstd/rt/uv/uvll.rs:834:1-834:1 -fn- definition:
pub unsafe fn spawn(loop_ptr: *c_void, result: *uv_process_t,
references:-libstd/rt/uv/process.rs:
97: uvll::spawn(loop_.native_handle(), **self, options)
libstd/rt/uv/uvll.rs:397:1-397:1 -fn- definition:
pub unsafe fn loop_delete(loop_handle: *c_void) {
references:-libstd/rt/uv/mod.rs:
114: unsafe { uvll::loop_delete(self.native_handle()) };
libstd/rt/uv/uvll.rs:823:2-823:2 -fn- definition:
}
pub unsafe fn populate_stat(req_in: *uv_fs_t, stat_out: *uv_stat_t) {
references:-libstd/rt/uv/file.rs:
279: unsafe { uvll::populate_stat(self.native_handle(), &stat); }
libstd/rt/uv/uvll.rs:764:1-764:1 -fn- definition:
pub unsafe fn fs_open(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, flags: int, mode: int,
references:-libstd/rt/uv/file.rs:
47: uvll::fs_open(loop_.native_handle(),
61: uvll::fs_open(loop_.native_handle(),
libstd/rt/uv/uvll.rs:904:2-904:2 -fn- definition:
}
pub unsafe fn get_stream_handle_from_write_req(write_req: *uv_write_t) -> *uv_stream_t {
references:-libstd/rt/uv/net.rs:
512: let stream_handle = uvll::get_stream_handle_from_write_req(self.native_handle());
libstd/rt/uv/uvll.rs:358:1-358:1 -fn- definition:
pub unsafe fn malloc_req(req: uv_req_type) -> *c_void {
references:-libstd/rt/uv/file.rs:
33: let fs_req = unsafe { malloc_req(UV_FS) };
libstd/rt/uv/net.rs:
505: let write_handle = unsafe { malloc_req(UV_WRITE) };
473: let connect_handle = unsafe { malloc_req(UV_CONNECT) };
536: let send_handle = unsafe { malloc_req(UV_UDP_SEND) };
libstd/rt/uv/addrinfo.rs:
33: let req = unsafe { uvll::malloc_req(UV_GETADDRINFO) };
libstd/rt/uv/uvll.rs:191:74-191:74 -ty- definition:
suggested_size: size_t) -> uv_buf_t;
pub type uv_read_cb = extern "C" fn(stream: *uv_stream_t,
references:-631: on_read: uv_read_cb) -> c_int {
1049: on_read: uv_read_cb) -> c_int;
libstd/rt/uv/uvll.rs:771:1-771:1 -fn- definition:
pub unsafe fn fs_unlink(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
references:-libstd/rt/uv/file.rs:
75: uvll::fs_unlink(loop_.native_handle(),
89: uvll::fs_unlink(loop_.native_handle(),
libstd/rt/uv/uvll.rs:298:16-298:16 -enum- definition:
#[deriving(Eq)]
pub enum uv_req_type {
references:-298: #[deriving(Eq)]
298: #[deriving(Eq)]
298: #[deriving(Eq)]
359: pub unsafe fn malloc_req(req: uv_req_type) -> *c_void {
libstd/rt/uv/uvll.rs:874:23-874:23 -fn- definition:
// data access helpers
pub unsafe fn get_result_from_fs_req(req: *uv_fs_t) -> c_int {
references:-libstd/rt/uv/file.rs:
269: uvll::get_result_from_fs_req(self.native_handle())
libstd/rt/uv/uvll.rs:599:1-599:1 -fn- definition:
pub unsafe fn tcp_simultaneous_accepts(handle: *uv_tcp_t, enable: c_int) -> c_int {
references:-libstd/rt/uv/uvio.rs:
911: uvll::tcp_simultaneous_accepts(self_.listener.watcher.native_handle(), 0 as c_int)
898: uvll::tcp_simultaneous_accepts(self_.listener.watcher.native_handle(), 1 as c_int)
libstd/rt/uv/uvll.rs:783:2-783:2 -fn- definition:
}
pub unsafe fn fs_read(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int, buf: *c_void,
references:-libstd/rt/uv/file.rs:
160: uvll::fs_read(loop_.native_handle(), self.native_handle(),
146: uvll::fs_read(loop_.native_handle(), self.native_handle(),
libstd/rt/uv/uvll.rs:201:56-201:56 -ty- definition:
flags: c_uint);
pub type uv_close_cb = extern "C" fn(handle: *uv_handle_t);
references:-410: pub unsafe fn close<T>(handle: *T, cb: uv_close_cb) {
978: fn rust_uv_close(handle: *c_void, cb: uv_close_cb);
libstd/rt/uv/uvll.rs:664:2-664:2 -fn- definition:
}
pub unsafe fn buf_init(input: *u8, len: uint) -> uv_buf_t {
references:-libstd/rt/uv/mod.rs:
303: unsafe { uvll::buf_init(data, v.len()) }
319: uvll::buf_init(data, v.len())
libstd/rt/uv/uvll.rs:537:1-537:1 -fn- definition:
pub unsafe fn udp_set_broadcast(handle: *uv_udp_t, on: c_int) -> c_int {
references:-libstd/rt/uv/uvio.rs:
1341: uvll::udp_set_broadcast(self_.watcher.native_handle(), 0 as c_int)
1327: uvll::udp_set_broadcast(self_.watcher.native_handle(), 1 as c_int)
libstd/rt/uv/uvll.rs:368:1-368:1 -fn- definition:
pub unsafe fn free_req(v: *c_void) {
references:-libstd/rt/uv/file.rs:
319: free_req(self.native_handle() as *c_void)
libstd/rt/uv/net.rs:
486: unsafe { free_req(self.native_handle() as *c_void) }
518: unsafe { free_req(self.native_handle() as *c_void) }
549: unsafe { free_req(self.native_handle() as *c_void) }
libstd/rt/uv/addrinfo.rs:
135: uvll::free_req(self.native_handle());
libstd/rt/uv/uvll.rs:728:1-728:1 -fn- definition:
pub unsafe fn free_ip4_addr(addr: *sockaddr_in) {
references:-libstd/rt/uv/net.rs:
52: Ipv4Addr(*) => free_ip4_addr,
libstd/rt/uv/uvll.rs:120:29-120:29 -ty- definition:
pub type uv_idle_t = c_void;
pub type uv_tcp_t = c_void;
references:-582: pub unsafe fn tcp_getsockname(handle: *uv_tcp_t, name: *sockaddr_storage) -> c_int {
1011: fn rust_uv_tcp_getpeername(tcp_handle_ptr: *uv_tcp_t, name: *sockaddr_storage) -> c_int;
544: pub unsafe fn tcp_init(loop_handle: *c_void, handle: *uv_tcp_t) -> c_int {
576: pub unsafe fn tcp_getpeername(tcp_handle_ptr: *uv_tcp_t, name: *sockaddr_storage) -> c_int {
1013: fn rust_uv_tcp_nodelay(handle: *uv_tcp_t, enable: c_int) -> c_int;
570: pub unsafe fn tcp_bind6(tcp_server_ptr: *uv_tcp_t, addr_ptr: *sockaddr_in6) -> c_int {
991: fn rust_uv_tcp_init(loop_handle: *c_void, handle_ptr: *uv_tcp_t) -> c_int;
1007: fn rust_uv_tcp_connect6(req: *uv_connect_t, handle: *uv_tcp_t,
600: pub unsafe fn tcp_simultaneous_accepts(handle: *uv_tcp_t, enable: c_int) -> c_int {
1012: fn rust_uv_tcp_getsockname(handle: *uv_tcp_t, name: *sockaddr_storage) -> c_int;
1006: fn rust_uv_tcp_bind(tcp_server: *uv_tcp_t, addr: *sockaddr_in) -> c_int;
1015: fn rust_uv_tcp_simultaneous_accepts(handle: *uv_tcp_t, enable: c_int) -> c_int;
557: pub unsafe fn tcp_connect6(connect_ptr: *uv_connect_t, tcp_handle_ptr: *uv_tcp_t,
1003: fn rust_uv_tcp_connect(req: *uv_connect_t, handle: *uv_tcp_t,
550: pub unsafe fn tcp_connect(connect_ptr: *uv_connect_t, tcp_handle_ptr: *uv_tcp_t,
588: pub unsafe fn tcp_nodelay(handle: *uv_tcp_t, enable: c_int) -> c_int {
594: pub unsafe fn tcp_keepalive(handle: *uv_tcp_t, enable: c_int, delay: c_uint) -> c_int {
1010: fn rust_uv_tcp_bind6(tcp_server: *uv_tcp_t, addr: *sockaddr_in6) -> c_int;
1014: fn rust_uv_tcp_keepalive(handle: *uv_tcp_t, enable: c_int, delay: c_uint) -> c_int;
564: pub unsafe fn tcp_bind(tcp_server_ptr: *uv_tcp_t, addr_ptr: *sockaddr_in) -> c_int {
libstd/rt/uv/net.rs:
331: fn from_native_handle(handle: *uvll::uv_tcp_t) -> TcpWatcher {
334: fn native_handle(&self) -> *uvll::uv_tcp_t {
330: impl NativeHandle<*uvll::uv_tcp_t> for TcpWatcher {
244: pub struct TcpWatcher(*uvll::uv_tcp_t);
libstd/rt/uv/uvll.rs:752:1-752:1 -fn- definition:
pub unsafe fn ip4_port(addr: *sockaddr_in) -> c_uint {
references:-libstd/rt/uv/net.rs:
82: UvIpv4SocketAddr(addr) => uvll::ip4_port(addr),
libstd/rt/uv/uvll.rs:500:1-500:1 -fn- definition:
pub unsafe fn get_udp_handle_from_send_req(send_req: *uv_udp_send_t) -> *uv_udp_t {
references:-libstd/rt/uv/net.rs:
543: uvll::get_udp_handle_from_send_req(self.native_handle())
libstd/rt/uv/uvll.rs:581:1-581:1 -fn- definition:
pub unsafe fn tcp_getsockname(handle: *uv_tcp_t, name: *sockaddr_storage) -> c_int {
references:-libstd/rt/uv/uvio.rs:
150: Tcp => uvll::tcp_getsockname,
libstd/rt/uv/uvll.rs:746:1-746:1 -fn- definition:
pub unsafe fn ip6_name(addr: *sockaddr_in6, dst: *u8, size: size_t) -> c_int {
references:-libstd/rt/uv/net.rs:
75: UvIpv6SocketAddr(addr) => uvll::ip6_name(addr, buf_ptr, ip_size as size_t),
libstd/rt/uv/uvll.rs:512:1-512:1 -fn- definition:
pub unsafe fn udp_set_membership(handle: *uv_udp_t, multicast_addr: *c_char,
references:-libstd/rt/uv/uvio.rs:
1239: uvll::udp_set_membership(self_.watcher.native_handle(), m_addr,
1255: uvll::udp_set_membership(self_.watcher.native_handle(), m_addr,
libstd/rt/uv/uvll.rs:204:51-204:51 -ty- definition:
arg: *c_void);
pub type uv_async_cb = extern "C" fn(handle: *uv_async_t,
references:-990: cb: uv_async_cb) -> c_int;
654: cb: uv_async_cb) -> c_int {
libstd/rt/uv/uvll.rs:673:1-673:1 -fn- definition:
pub unsafe fn timer_init(loop_ptr: *c_void, timer_ptr: *uv_timer_t) -> c_int {
references:-libstd/rt/uv/timer.rs:
25: assert!(0 == uvll::timer_init(loop_.native_handle(), handle));
libstd/rt/uv/uvll.rs:899:2-899:2 -fn- definition:
}
pub unsafe fn get_stream_handle_from_connect_req(connect: *uv_connect_t) -> *uv_stream_t {
references:-libstd/rt/uv/net.rs:
480: let stream_handle = uvll::get_stream_handle_from_connect_req(self.native_handle());
libstd/rt/uv/uvll.rs:208:55-208:55 -ty- definition:
status: c_int);
pub type uv_connection_cb = extern "C" fn(handle: *uv_connection_t,
references:-607: cb: uv_connection_cb) -> c_int {
1043: cb: uv_connection_cb) -> c_int;
libstd/rt/uv/uvll.rs:227:13-227:13 -ty- definition:
#[cfg(unix)]
pub type socklen_t = c_int;
references:-238: ai_addrlen: socklen_t,
libstd/rt/uv/uvll.rs:494:1-494:1 -fn- definition:
pub unsafe fn udp_recv_stop(server: *uv_udp_t) -> c_int {
references:-libstd/rt/uv/net.rs:
404: unsafe { uvll::udp_recv_stop(self.native_handle()); }
libstd/rt/uv/uvll.rs:128:31-128:31 -ty- definition:
pub type uv_stream_t = c_void;
pub type uv_fs_t = c_void;
references:-801: pub unsafe fn fs_fstat(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int, cb: *u8) -> c_int {
790: pub unsafe fn fs_close(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int,
818: pub unsafe fn fs_readdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
778: pub unsafe fn fs_write(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int, buf: *c_void,
1057: fn rust_uv_fs_unlink(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char,
1066: fn rust_uv_fs_fstat(loop_ptr: *c_void, req: *uv_fs_t, fd: c_int, cb: *u8) -> c_int;
880: pub unsafe fn get_ptr_from_fs_req(req: *uv_fs_t) -> *libc::c_void {
1076: fn rust_uv_get_ptr_from_fs_req(req: *uv_fs_t) -> *libc::c_void;
812: pub unsafe fn fs_rmdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
1063: fn rust_uv_fs_close(loop_ptr: *c_void, req: *uv_fs_t, fd: c_int,
1059: fn rust_uv_fs_write(loop_ptr: *c_void, req: *uv_fs_t, fd: c_int,
806: pub unsafe fn fs_mkdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, mode: int,
829: pub unsafe fn fs_req_cleanup(req: *uv_fs_t) {
784: pub unsafe fn fs_read(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int, buf: *c_void,
1067: fn rust_uv_fs_mkdir(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char,
1065: fn rust_uv_fs_stat(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char, cb: *u8) -> c_int;
772: pub unsafe fn fs_unlink(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
875: pub unsafe fn get_result_from_fs_req(req: *uv_fs_t) -> c_int {
796: pub unsafe fn fs_stat(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, cb: *u8) -> c_int {
1078: fn rust_uv_get_loop_from_getaddrinfo_req(req: *uv_fs_t) -> *uv_loop_t;
1071: fn rust_uv_fs_readdir(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char,
1075: fn rust_uv_get_result_from_fs_req(req: *uv_fs_t) -> c_int;
1069: fn rust_uv_fs_rmdir(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char,
765: pub unsafe fn fs_open(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, flags: int, mode: int,
824: pub unsafe fn populate_stat(req_in: *uv_fs_t, stat_out: *uv_stat_t) {
1061: fn rust_uv_fs_read(loop_ptr: *c_void, req: *uv_fs_t, fd: c_int,
1077: fn rust_uv_get_loop_from_fs_req(req: *uv_fs_t) -> *uv_loop_t;
1073: fn rust_uv_fs_req_cleanup(req: *uv_fs_t);
885: pub unsafe fn get_loop_from_fs_req(req: *uv_fs_t) -> *uv_loop_t {
1055: fn rust_uv_fs_open(loop_ptr: *c_void, req: *uv_fs_t, path: *c_char,
(1074)libstd/rt/uv/file.rs:
(324)(24)(328)(341)(325)libstd/rt/uv/uvll.rs:828:2-828:2 -fn- definition:
}
pub unsafe fn fs_req_cleanup(req: *uv_fs_t) {
references:-libstd/rt/uv/file.rs:
318: uvll::fs_req_cleanup(self.native_handle());
libstd/rt/uv/uvll.rs:132:32-132:32 -ty- definition:
pub type uv_process_t = c_void;
pub type uv_pipe_t = c_void;
references:-1104: fn rust_uv_pipe_init(loop_ptr: *c_void, p: *uv_pipe_t, ipc: c_int) -> c_int;
869: pub unsafe fn pipe_init(loop_ptr: *c_void, p: *uv_pipe_t, ipc: c_int) -> c_int {
libstd/rt/uv/pipe.rs:
60: fn from_native_handle(handle: *uvll::uv_pipe_t) -> Pipe {
50: extern fn close_cb(handle: *uvll::uv_pipe_t) {
59: impl uv::NativeHandle<*uvll::uv_pipe_t> for Pipe {
18: pub struct Pipe(*uvll::uv_pipe_t);
63: fn native_handle(&self) -> *uvll::uv_pipe_t {
libstd/rt/uv/uvll.rs:187:1-187:1 -ty- definition:
pub type uv_idle_cb = extern "C" fn(handle: *uv_idle_t,
references:-440: pub unsafe fn idle_start(handle: *uv_idle_t, cb: uv_idle_cb) -> c_int {
984: fn rust_uv_idle_start(handle: *uv_idle_t, cb: uv_idle_cb) -> c_int;
libstd/rt/uv/uvll.rs:222:28-222:28 -ty- definition:
pub type sockaddr = c_void;
pub type sockaddr_in = c_void;
references:-995: fn rust_uv_ip4_addrp(ip: *u8, port: c_int) -> *sockaddr_in;
1018: fn rust_uv_udp_bind(server: *uv_udp_t, addr: *sockaddr_in, flags: c_uint) -> c_int;
729: pub unsafe fn free_ip4_addr(addr: *sockaddr_in) {
564: pub unsafe fn tcp_bind(tcp_server_ptr: *uv_tcp_t, addr_ptr: *sockaddr_in) -> c_int {
458: pub unsafe fn udp_bind(server: *uv_udp_t, addr: *sockaddr_in, flags: c_uint) -> c_int {
753: pub unsafe fn ip4_port(addr: *sockaddr_in) -> c_uint {
704: pub unsafe fn malloc_ip4_addr(ip: &str, port: int) -> *sockaddr_in {
741: pub unsafe fn ip4_name(addr: *sockaddr_in, dst: *u8, size: size_t) -> c_int {
1005: addr: *sockaddr_in) -> c_int;
997: fn rust_uv_free_ip4_addr(addr: *sockaddr_in);
1021: buf_cnt: c_int, addr: *sockaddr_in, cb: uv_udp_send_cb) -> c_int;
1006: fn rust_uv_tcp_bind(tcp_server: *uv_tcp_t, addr: *sockaddr_in) -> c_int;
471: addr: *sockaddr_in, cb: uv_udp_send_cb) -> c_int {
551: addr_ptr: *sockaddr_in, after_connect_cb: uv_connect_cb) -> c_int {
1001: fn rust_uv_ip4_port(src: *sockaddr_in) -> c_uint;
999: fn rust_uv_ip4_name(src: *sockaddr_in, dst: *u8, size: size_t) -> c_int;
libstd/rt/uv/net.rs:
35: _ if is_ip4_addr(addr) => UvIpv4SocketAddr(addr as *uvll::sockaddr_in),
26: UvIpv4SocketAddr(*sockaddr_in),
libstd/rt/uv/uvio.rs:
171: net::uv_socket_addr_to_socket_addr(UvIpv4SocketAddr(r_addr as *uvll::sockaddr_in))
libstd/rt/uv/uvll.rs:196:56-196:56 -ty- definition:
status: c_int);
pub type uv_udp_recv_cb = extern "C" fn(handle: *uv_udp_t,
references:-1026: on_recv: uv_udp_recv_cb) -> c_int;
489: on_recv: uv_udp_recv_cb) -> c_int {
libstd/rt/uv/uvll.rs:789:2-789:2 -fn- definition:
}
pub unsafe fn fs_close(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int,
references:-libstd/rt/uv/file.rs:
173: uvll::fs_close(loop_.native_handle(), self.native_handle(),
183: uvll::fs_close(loop_.native_handle(), self.native_handle(),
libstd/rt/uv/uvll.rs:678:2-678:2 -fn- definition:
}
pub unsafe fn timer_start(timer_ptr: *uv_timer_t,
references:-libstd/rt/uv/timer.rs:
39: uvll::timer_start(self.native_handle(), timer_cb, timeout, repeat);
libstd/rt/uv/uvll.rs:134:1-134:1 -struct- definition:
pub struct uv_timespec_t {
references:-154: st_mtim: uv_timespec_t,
155: st_ctim: uv_timespec_t,
156: st_birthtim: uv_timespec_t
177: st_birthtim: uv_timespec_t { tv_sec: 0, tv_nsec: 0 }
153: st_atim: uv_timespec_t,
175: st_mtim: uv_timespec_t { tv_sec: 0, tv_nsec: 0 },
176: st_ctim: uv_timespec_t { tv_sec: 0, tv_nsec: 0 },
174: st_atim: uv_timespec_t { tv_sec: 0, tv_nsec: 0 },
libstd/rt/uv/uvll.rs:740:1-740:1 -fn- definition:
pub unsafe fn ip4_name(addr: *sockaddr_in, dst: *u8, size: size_t) -> c_int {
references:-libstd/rt/uv/net.rs:
74: UvIpv4SocketAddr(addr) => uvll::ip4_name(addr, buf_ptr, ip_size as size_t),
libstd/rt/uv/uvll.rs:126:30-126:30 -ty- definition:
pub type uv_async_t = c_void;
pub type uv_timer_t = c_void;
references:-211: pub type uv_timer_cb = extern "C" fn(handle: *uv_timer_t,
1052: fn rust_uv_timer_start(timer_handle: *uv_timer_t, cb: uv_timer_cb, timeout: libc::uint64_t,
1054: fn rust_uv_timer_stop(handle: *uv_timer_t) -> c_int;
686: pub unsafe fn timer_stop(timer_ptr: *uv_timer_t) -> c_int {
679: pub unsafe fn timer_start(timer_ptr: *uv_timer_t,
1051: fn rust_uv_timer_init(loop_handle: *c_void, timer_handle: *uv_timer_t) -> c_int;
674: pub unsafe fn timer_init(loop_ptr: *c_void, timer_ptr: *uv_timer_t) -> c_int {
libstd/rt/uv/timer.rs:
84: fn from_native_handle(handle: *uvll::uv_timer_t) -> TimerWatcher {
42: extern fn timer_cb(handle: *uvll::uv_timer_t, status: c_int) {
17: pub struct TimerWatcher(*uvll::uv_timer_t);
69: extern fn close_cb(handle: *uvll::uv_timer_t) {
83: impl NativeHandle<*uvll::uv_timer_t> for TimerWatcher {
libstd/rt/uv/uvll.rs:605:1-605:1 -fn- definition:
pub unsafe fn listen<T>(stream: *T, backlog: c_int,
references:-libstd/rt/uv/net.rs:
313: assert_eq!(0, uvll::listen(self.native_handle(), BACKLOG, connection_cb));
libstd/rt/uv/uvll.rs:119:29-119:29 -ty- definition:
pub type uv_loop_t = c_void;
pub type uv_idle_t = c_void;
references:-984: fn rust_uv_idle_start(handle: *uv_idle_t, cb: uv_idle_cb) -> c_int;
440: pub unsafe fn idle_start(handle: *uv_idle_t, cb: uv_idle_cb) -> c_int {
434: pub unsafe fn idle_init(loop_handle: *uv_loop_t, handle: *uv_idle_t) -> c_int {
985: fn rust_uv_idle_stop(handle: *uv_idle_t) -> c_int;
428: pub unsafe fn idle_delete(handle: *uv_idle_t) {
188: pub type uv_idle_cb = extern "C" fn(handle: *uv_idle_t,
446: pub unsafe fn idle_stop(handle: *uv_idle_t) -> c_int {
981: fn rust_uv_idle_new() -> *uv_idle_t;
422: pub unsafe fn idle_new() -> *uv_idle_t {
982: fn rust_uv_idle_delete(handle: *uv_idle_t);
983: fn rust_uv_idle_init(loop_handle: *uv_loop_t, handle: *uv_idle_t) -> c_int;
libstd/rt/uv/idle.rs:
85: extern fn close_cb(handle: *uvll::uv_idle_t) {
56: extern fn idle_cb(handle: *uvll::uv_idle_t, status: c_int) {
99: impl NativeHandle<*uvll::uv_idle_t> for IdleWatcher {
100: fn from_native_handle(handle: *uvll::uv_idle_t) -> IdleWatcher {
42: extern fn idle_cb(handle: *uvll::uv_idle_t, status: c_int) {
103: fn native_handle(&self) -> *uvll::uv_idle_t {
17: pub struct IdleWatcher(*uvll::uv_idle_t);
libstd/rt/uv/timer.rs:
87: fn native_handle(&self) -> *uvll::uv_idle_t {
libstd/rt/uv/uvll.rs:884:2-884:2 -fn- definition:
}
pub unsafe fn get_loop_from_fs_req(req: *uv_fs_t) -> *uv_loop_t {
references:-libstd/rt/uv/file.rs:
274: unsafe { Loop{handle:uvll::get_loop_from_fs_req(self.native_handle())} }
libstd/rt/uv/addrinfo.rs:
106: handle: uvll::get_loop_from_fs_req(self.native_handle())
libstd/rt/uv/uvll.rs:956:2-956:2 -fn- definition:
}
pub unsafe fn freeaddrinfo(ai: *addrinfo) {
references:-libstd/rt/uv/addrinfo.rs:
98: uvll::freeaddrinfo(res);
libstd/rt/uv/uvll.rs:129:27-129:27 -ty- definition:
pub type uv_fs_t = c_void;
pub type uv_udp_send_t = c_void;
references:-195: pub type uv_udp_send_cb = extern "C" fn(req: *uv_udp_send_t,
501: pub unsafe fn get_udp_handle_from_send_req(send_req: *uv_udp_send_t) -> *uv_udp_t {
479: pub unsafe fn udp_send6<T>(req: *uv_udp_send_t, handle: *T, buf_in: &[uv_buf_t],
1028: fn rust_uv_get_udp_handle_from_send_req(req: *uv_udp_send_t) -> *uv_udp_t;
1022: fn rust_uv_udp_send6(req: *uv_udp_send_t, handle: *uv_udp_t, buf_in: *uv_buf_t,
1020: fn rust_uv_udp_send(req: *uv_udp_send_t, handle: *uv_udp_t, buf_in: *uv_buf_t,
470: pub unsafe fn udp_send<T>(req: *uv_udp_send_t, handle: *T, buf_in: &[uv_buf_t],
libstd/rt/uv/net.rs:
557: fn native_handle(&self) -> *uvll::uv_udp_send_t {
538: UdpSendRequest(send_handle as *uvll::uv_udp_send_t)
531: pub struct UdpSendRequest(*uvll::uv_udp_send_t);
554: fn from_native_handle(handle: *uvll::uv_udp_send_t) -> UdpSendRequest {
553: impl NativeHandle<*uvll::uv_udp_send_t> for UdpSendRequest {
427: extern fn send_cb(req: *uvll::uv_udp_send_t, status: c_int) {
libstd/rt/uv/uvll.rs:919:2-919:2 -fn- definition:
}
pub unsafe fn get_data_for_uv_handle<T>(handle: *T) -> *c_void {
references:-libstd/rt/uv/mod.rs:
197: let data = uvll::get_data_for_uv_handle(self.native_handle());
205: let data = uvll::get_data_for_uv_handle(self.native_handle());
libstd/rt/uv/uvll.rs:118:31-118:31 -ty- definition:
pub type uv_handle_t = c_void;
pub type uv_loop_t = c_void;
references:-434: pub unsafe fn idle_init(loop_handle: *uv_loop_t, handle: *uv_idle_t) -> c_int {
818: pub unsafe fn fs_readdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
983: fn rust_uv_idle_init(loop_handle: *uv_loop_t, handle: *uv_idle_t) -> c_int;
1091: fn rust_uv_getaddrinfo(loop_: *uv_loop_t, req: *uv_getaddrinfo_t,
812: pub unsafe fn fs_rmdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
1077: fn rust_uv_get_loop_from_fs_req(req: *uv_fs_t) -> *uv_loop_t;
778: pub unsafe fn fs_write(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int, buf: *c_void,
765: pub unsafe fn fs_open(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, flags: int, mode: int,
950: pub unsafe fn getaddrinfo(loop_: *uv_loop_t, req: *uv_getaddrinfo_t,
801: pub unsafe fn fs_fstat(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int, cb: *u8) -> c_int {
784: pub unsafe fn fs_read(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int, buf: *c_void,
1017: fn rust_uv_udp_init(loop_handle: *uv_loop_t, handle_ptr: *uv_udp_t) -> c_int;
796: pub unsafe fn fs_stat(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, cb: *u8) -> c_int {
790: pub unsafe fn fs_close(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int,
1078: fn rust_uv_get_loop_from_getaddrinfo_req(req: *uv_fs_t) -> *uv_loop_t;
772: pub unsafe fn fs_unlink(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
885: pub unsafe fn get_loop_from_fs_req(req: *uv_fs_t) -> *uv_loop_t {
890: pub unsafe fn get_loop_from_getaddrinfo_req(req: *uv_getaddrinfo_t) -> *uv_loop_t {
452: pub unsafe fn udp_init(loop_handle: *uv_loop_t, handle: *uv_udp_t) -> c_int {
806: pub unsafe fn fs_mkdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, mode: int,
libstd/rt/uv/mod.rs:
119: fn from_native_handle(handle: *uvll::uv_loop_t) -> Loop {
118: impl NativeHandle<*uvll::uv_loop_t> for Loop {
122: fn native_handle(&self) -> *uvll::uv_loop_t {
83: handle: *uvll::uv_loop_t
libstd/rt/uv/uvll.rs:646:2-646:2 -fn- definition:
}
pub unsafe fn err_name(err: c_int) -> *c_char {
references:-libstd/rt/uv/mod.rs:
221: let name_str = uvll::err_name(inner);
libstd/rt/uv/uvll.rs:217:60-217:60 -ty- definition:
res: *addrinfo);
pub type uv_exit_cb = extern "C" fn(handle: *uv_process_t,
references:-99: exit_cb: uv_exit_cb,
libstd/rt/uv/uvll.rs:850:1-850:1 -fn- definition:
pub unsafe fn set_stdio_container_flags(c: *uv_stdio_container_t,
references:-libstd/rt/uv/process.rs:
167: uvll::set_stdio_container_flags(dst, flags);
150: uvll::set_stdio_container_flags(dst, uvll::STDIO_IGNORE);
154: uvll::set_stdio_container_flags(dst, uvll::STDIO_INHERIT_FD);
libstd/rt/uv/uvll.rs:210:58-210:58 -ty- definition:
status: c_int);
pub type uv_timer_cb = extern "C" fn(handle: *uv_timer_t,
references:-680: cb: uv_timer_cb, timeout: u64,
1052: fn rust_uv_timer_start(timer_handle: *uv_timer_t, cb: uv_timer_cb, timeout: libc::uint64_t,
libstd/rt/uv/uvll.rs:543:1-543:1 -fn- definition:
pub unsafe fn tcp_init(loop_handle: *c_void, handle: *uv_tcp_t) -> c_int {
references:-libstd/rt/uv/net.rs:
252: assert_eq!(0, uvll::tcp_init(loop_.native_handle(), handle));
libstd/rt/uv/uvll.rs:125:30-125:30 -ty- definition:
pub type uv_write_t = c_void;
pub type uv_async_t = c_void;
references:-660: pub unsafe fn async_send(async_handle: *uv_async_t) {
989: async_handle: *uv_async_t,
987: fn rust_uv_async_send(handle: *uv_async_t);
205: pub type uv_async_cb = extern "C" fn(handle: *uv_async_t,
653: async_handle: *uv_async_t,
libstd/rt/uv/async.rs:
73: impl NativeHandle<*uvll::uv_async_t> for AsyncWatcher {
74: fn from_native_handle(handle: *uvll::uv_async_t) -> AsyncWatcher {
35: extern fn async_cb(handle: *uvll::uv_async_t, status: c_int) {
77: fn native_handle(&self) -> *uvll::uv_async_t {
19: pub struct AsyncWatcher(*uvll::uv_async_t);
libstd/rt/uv/uvll.rs:352:1-352:1 -fn- definition:
pub unsafe fn free_handle(v: *c_void) {
references:-libstd/rt/uv/net.rs:
451: unsafe { free_handle(handle as *c_void) }
229: unsafe { free_handle(handle as *c_void) }
libstd/rt/uv/timer.rs:
77: uvll::free_handle(handle as *c_void);
libstd/rt/uv/async.rs:
68: unsafe { uvll::free_handle(handle as *c_void); }
libstd/rt/uv/process.rs:
141: unsafe { uvll::free_handle(handle as *libc::c_void) }
libstd/rt/uv/pipe.rs:
54: unsafe { uvll::free_handle(handle as *libc::c_void) }
libstd/rt/uv/uvll.rs:894:2-894:2 -fn- definition:
}
pub unsafe fn get_loop_for_uv_handle<T>(handle: *T) -> *c_void {
references:-libstd/rt/uv/mod.rs:
170: let loop_ = uvll::get_loop_for_uv_handle(handle);
libstd/rt/uv/uvll.rs:130:33-130:33 -ty- definition:
pub type uv_udp_send_t = c_void;
pub type uv_getaddrinfo_t = c_void;
references:-950: pub unsafe fn getaddrinfo(loop_: *uv_loop_t, req: *uv_getaddrinfo_t,
1091: fn rust_uv_getaddrinfo(loop_: *uv_loop_t, req: *uv_getaddrinfo_t,
890: pub unsafe fn get_loop_from_getaddrinfo_req(req: *uv_getaddrinfo_t) -> *uv_loop_t {
215: pub type uv_getaddrinfo_cb = extern "C" fn(req: *uv_getaddrinfo_t,
libstd/rt/uv/addrinfo.rs:
112: let req = self.native_handle() as *uvll::uv_getaddrinfo_t;
89: extern "C" fn getaddrinfo_cb(req: *uvll::uv_getaddrinfo_t,
144: fn native_handle(&self) -> *uvll::uv_getaddrinfo_t {
141: fn from_native_handle(handle: *uvll::uv_getaddrinfo_t) -> GetAddrInfoRequest {
25: pub struct GetAddrInfoRequest(*uvll::uv_getaddrinfo_t);
140: impl NativeHandle<*uvll::uv_getaddrinfo_t> for GetAddrInfoRequest {
libstd/rt/uv/uvll.rs:879:2-879:2 -fn- definition:
}
pub unsafe fn get_ptr_from_fs_req(req: *uv_fs_t) -> *libc::c_void {
references:-libstd/rt/uv/file.rs:
285: uvll::get_ptr_from_fs_req(self.native_handle())
libstd/rt/uv/uvll.rs:274:16-274:16 -enum- definition:
#[deriving(Eq)]
pub enum uv_handle_type {
references:-274: #[deriving(Eq)]
274: #[deriving(Eq)]
343: pub unsafe fn malloc_handle(handle: uv_handle_type) -> *c_void {
274: #[deriving(Eq)]
libstd/rt/uv/uvll.rs:139:1-139:1 -struct- definition:
pub struct uv_stat_t {
references:-161: uv_stat_t {
159: impl uv_stat_t {
1074: fn rust_uv_populate_uv_stat(req_in: *uv_fs_t, stat_out: *uv_stat_t);
824: pub unsafe fn populate_stat(req_in: *uv_fs_t, stat_out: *uv_stat_t) {
160: pub fn new() -> uv_stat_t {
libstd/rt/uv/file.rs:
277: pub fn get_stat(&self) -> uv_stat_t {
libstd/rt/uv/uvll.rs:223:31-223:31 -ty- definition:
pub type sockaddr_in = c_void;
pub type sockaddr_in6 = c_void;
references:-464: pub unsafe fn udp_bind6(server: *uv_udp_t, addr: *sockaddr_in6, flags: c_uint) -> c_int {
558: addr_ptr: *sockaddr_in6, after_connect_cb: uv_connect_cb) -> c_int {
759: pub unsafe fn ip6_port(addr: *sockaddr_in6) -> c_uint {
996: fn rust_uv_ip6_addrp(ip: *u8, port: c_int) -> *sockaddr_in6;
480: addr: *sockaddr_in6, cb: uv_udp_send_cb) -> c_int {
1000: fn rust_uv_ip6_name(src: *sockaddr_in6, dst: *u8, size: size_t) -> c_int;
747: pub unsafe fn ip6_name(addr: *sockaddr_in6, dst: *u8, size: size_t) -> c_int {
1023: buf_cnt: c_int, addr: *sockaddr_in6, cb: uv_udp_send_cb) -> c_int;
1010: fn rust_uv_tcp_bind6(tcp_server: *uv_tcp_t, addr: *sockaddr_in6) -> c_int;
735: pub unsafe fn free_ip6_addr(addr: *sockaddr_in6) {
570: pub unsafe fn tcp_bind6(tcp_server_ptr: *uv_tcp_t, addr_ptr: *sockaddr_in6) -> c_int {
710: pub unsafe fn malloc_ip6_addr(ip: &str, port: int) -> *sockaddr_in6 {
1002: fn rust_uv_ip6_port(src: *sockaddr_in6) -> c_uint;
998: fn rust_uv_free_ip6_addr(addr: *sockaddr_in6);
1009: addr: *sockaddr_in6) -> c_int;
1019: fn rust_uv_udp_bind6(server: *uv_udp_t, addr: *sockaddr_in6, flags: c_uint) -> c_int;
libstd/rt/uv/net.rs:
36: _ if is_ip6_addr(addr) => UvIpv6SocketAddr(addr as *uvll::sockaddr_in6),
27: UvIpv6SocketAddr(*sockaddr_in6),
libstd/rt/uv/uvio.rs:
169: net::uv_socket_addr_to_socket_addr(UvIpv6SocketAddr(r_addr as *uvll::sockaddr_in6))
libstd/rt/uv/uvll.rs:269:13-269:13 -ty- definition:
#[cfg(unix)] pub type uv_uid_t = libc::types::os::arch::posix88::uid_t;
#[cfg(unix)] pub type uv_gid_t = libc::types::os::arch::posix88::gid_t;
references:-107: uid: uv_uid_t,
libstd/rt/uv/uvll.rs:703:1-703:1 -fn- definition:
pub unsafe fn malloc_ip4_addr(ip: &str, port: int) -> *sockaddr_in {
references:-libstd/rt/uv/net.rs:
44: Ipv4Addr(*) => malloc_ip4_addr,
libstd/rt/uv/uvll.rs:127:30-127:30 -ty- definition:
pub type uv_timer_t = c_void;
pub type uv_stream_t = c_void;
references:-190: pub type uv_alloc_cb = extern "C" fn(stream: *uv_stream_t,
1081: fn rust_uv_get_stream_handle_from_write_req(write_req: *uv_write_t) -> *uv_stream_t;
192: pub type uv_read_cb = extern "C" fn(stream: *uv_stream_t,
1103: stream: *uv_stream_t);
900: pub unsafe fn get_stream_handle_from_connect_req(connect: *uv_connect_t) -> *uv_stream_t {
1080: fn rust_uv_get_stream_handle_from_connect_req(connect_req: *uv_connect_t) -> *uv_stream_t;
115: priv stream: *uv_stream_t,
905: pub unsafe fn get_stream_handle_from_write_req(write_req: *uv_write_t) -> *uv_stream_t {
629: pub unsafe fn read_start(stream: *uv_stream_t,
864: stream: *uv_stream_t) {
637: pub unsafe fn read_stop(stream: *uv_stream_t) -> c_int {
libstd/rt/uv/net.rs:
326: NativeHandle::from_native_handle(self.native_handle() as *uvll::uv_stream_t)
236: fn from_native_handle(handle: *uvll::uv_stream_t) -> StreamWatcher {
225: extern fn close_cb(handle: *uvll::uv_stream_t) {
235: impl NativeHandle<*uvll::uv_stream_t> for StreamWatcher {
163: extern fn alloc_cb(stream: *uvll::uv_stream_t, suggested_size: size_t) -> Buf {
239: fn native_handle(&self) -> *uvll::uv_stream_t {
169: extern fn read_cb(stream: *uvll::uv_stream_t, nread: ssize_t, buf: Buf) {
139: pub struct StreamWatcher(*uvll::uv_stream_t);
316: extern fn connection_cb(handle: *uvll::uv_stream_t, status: c_int) {
158: fn call_read_cb(stream: *uvll::uv_stream_t, errno: ssize_t) {
libstd/rt/uv/async.rs:
61: extern fn close_cb(handle: *uvll::uv_stream_t) {
libstd/rt/uv/pipe.rs:
37: net::StreamWatcher(**self as *uvll::uv_stream_t)
libstd/rt/uv/uvll.rs:457:1-457:1 -fn- definition:
pub unsafe fn udp_bind(server: *uv_udp_t, addr: *sockaddr_in, flags: c_uint) -> c_int {
references:-libstd/rt/uv/net.rs:
358: UvIpv4SocketAddr(addr) => uvll::udp_bind(self.native_handle(), addr, 0u32),
libstd/rt/uv/uvll.rs:549:1-549:1 -fn- definition:
pub unsafe fn tcp_connect(connect_ptr: *uv_connect_t, tcp_handle_ptr: *uv_tcp_t,
references:-libstd/rt/uv/net.rs:
283: UvIpv4SocketAddr(addr) => uvll::tcp_connect(connect_handle,
libstd/rt/uv/uvll.rs:805:2-805:2 -fn- definition:
}
pub unsafe fn fs_mkdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, mode: int,
references:-libstd/rt/uv/file.rs:
196: uvll::fs_mkdir(loop_.native_handle(),
libstd/rt/uv/uvll.rs:575:1-575:1 -fn- definition:
pub unsafe fn tcp_getpeername(tcp_handle_ptr: *uv_tcp_t, name: *sockaddr_storage) -> c_int {
references:-libstd/rt/uv/uvio.rs:
149: TcpPeer => uvll::tcp_getpeername,
libstd/rt/uv/uvll.rs:270:13-270:13 -ty- definition:
#[cfg(unix)] pub type uv_gid_t = libc::types::os::arch::posix88::gid_t;
#[cfg(windows)] pub type uv_uid_t = libc::c_uchar;
references:-108: gid: uv_gid_t,
libstd/rt/uv/uvll.rs:487:1-487:1 -fn- definition:
pub unsafe fn udp_recv_start(server: *uv_udp_t, on_alloc: uv_alloc_cb,
references:-libstd/rt/uv/net.rs:
376: unsafe { uvll::udp_recv_start(self.native_handle(), alloc_cb, recv_cb); }
libstd/rt/uv/uvll.rs:194:52-194:52 -ty- definition:
buf: uv_buf_t);
pub type uv_udp_send_cb = extern "C" fn(req: *uv_udp_send_t,
references:-1021: buf_cnt: c_int, addr: *sockaddr_in, cb: uv_udp_send_cb) -> c_int;
471: addr: *sockaddr_in, cb: uv_udp_send_cb) -> c_int {
1023: buf_cnt: c_int, addr: *sockaddr_in6, cb: uv_udp_send_cb) -> c_int;
480: addr: *sockaddr_in6, cb: uv_udp_send_cb) -> c_int {
libstd/rt/uv/uvll.rs:642:1-642:1 -fn- definition:
pub unsafe fn strerror(err: c_int) -> *c_char {
references:-libstd/rt/uv/mod.rs:
260: let c_desc = uvll::strerror(*uverr);
230: let desc_str = uvll::strerror(inner);
libstd/rt/uv/uvll.rs:685:2-685:2 -fn- definition:
}
pub unsafe fn timer_stop(timer_ptr: *uv_timer_t) -> c_int {
references:-libstd/rt/uv/timer.rs:
53: uvll::timer_stop(self.native_handle());
libstd/rt/uv/uvll.rs:636:1-636:1 -fn- definition:
pub unsafe fn read_stop(stream: *uv_stream_t) -> c_int {
references:-libstd/rt/uv/net.rs:
184: unsafe { uvll::read_stop(handle); }
libstd/rt/uv/uvll.rs:722:1-722:1 -fn- definition:
pub unsafe fn free_sockaddr_storage(ss: *sockaddr_storage) {
references:-libstd/rt/uv/uvio.rs:
175: unsafe { uvll::free_sockaddr_storage(r_addr); }
libstd/rt/uv/uvll.rs:612:1-612:1 -fn- definition:
pub unsafe fn accept(server: *c_void, client: *c_void) -> c_int {
references:-libstd/rt/uv/net.rs:
212: assert_eq!(0, unsafe { uvll::accept(self_handle, stream_handle) } );
libstd/rt/uv/uvll.rs:659:1-659:1 -fn- definition:
pub unsafe fn async_send(async_handle: *uv_async_t) {
references:-libstd/rt/uv/async.rs:
47: uvll::async_send(handle);
libstd/rt/uv/uvll.rs:868:1-868:1 -fn- definition:
pub unsafe fn pipe_init(loop_ptr: *c_void, p: *uv_pipe_t, ipc: c_int) -> c_int {
references:-libstd/rt/uv/pipe.rs:
28: assert_eq!(uvll::pipe_init(loop_.native_handle(), handle, ipc), 0);
libstd/rt/uv/uvll.rs:817:2-817:2 -fn- definition:
}
pub unsafe fn fs_readdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
references:-libstd/rt/uv/file.rs:
223: uvll::fs_readdir(loop_.native_handle(),
libstd/rt/uv/uvll.rs:232:28-232:28 -struct- definition:
#[cfg(target_os = "linux")]
pub struct addrinfo {
references:-957: pub unsafe fn freeaddrinfo(ai: *addrinfo) {
217: res: *addrinfo);
1094: hints: *addrinfo) -> c_int;
1095: fn rust_uv_freeaddrinfo(ai: *addrinfo);
953: hints: *addrinfo) -> c_int {
241: ai_next: *addrinfo
libstd/rt/uv/net.rs:
23: pub struct UvAddrInfo(*uvll::addrinfo);
libstd/rt/uv/addrinfo.rs:
91: res: *uvll::addrinfo) {
libstd/rt/uv/uvll.rs:131:36-131:36 -ty- definition:
pub type uv_getaddrinfo_t = c_void;
pub type uv_process_t = c_void;
references:-846: pub unsafe fn process_pid(p: *uv_process_t) -> c_int {
841: pub unsafe fn process_kill(p: *uv_process_t, signum: c_int) -> c_int {
1096: fn rust_uv_spawn(loop_ptr: *c_void, outptr: *uv_process_t,
1099: fn rust_uv_process_pid(p: *uv_process_t) -> c_int;
835: pub unsafe fn spawn(loop_ptr: *c_void, result: *uv_process_t,
1098: fn rust_uv_process_kill(p: *uv_process_t, signum: c_int) -> c_int;
218: pub type uv_exit_cb = extern "C" fn(handle: *uv_process_t,
libstd/rt/uv/process.rs:
216: fn native_handle(&self) -> *uvll::uv_process_t {
51: extern fn on_exit(p: *uvll::uv_process_t,
24: pub struct Process(*uvll::uv_process_t);
212: impl uv::NativeHandle<*uvll::uv_process_t> for Process {
137: extern fn close_cb(handle: *uvll::uv_process_t) {
213: fn from_native_handle(handle: *uvll::uv_process_t) -> Process {
libstd/rt/uv/uvll.rs:224:32-224:32 -ty- definition:
pub type sockaddr_in6 = c_void;
pub type sockaddr_storage = c_void;
references:-507: pub unsafe fn udp_getsockname(handle: *uv_udp_t, name: *sockaddr_storage) -> c_int {
723: pub unsafe fn free_sockaddr_storage(ss: *sockaddr_storage) {
1011: fn rust_uv_tcp_getpeername(tcp_handle_ptr: *uv_tcp_t, name: *sockaddr_storage) -> c_int;
1039: fn rust_uv_malloc_sockaddr_storage() -> *sockaddr_storage;
582: pub unsafe fn tcp_getsockname(handle: *uv_tcp_t, name: *sockaddr_storage) -> c_int {
1012: fn rust_uv_tcp_getsockname(handle: *uv_tcp_t, name: *sockaddr_storage) -> c_int;
717: pub unsafe fn malloc_sockaddr_storage() -> *sockaddr_storage {
576: pub unsafe fn tcp_getpeername(tcp_handle_ptr: *uv_tcp_t, name: *sockaddr_storage) -> c_int {
1029: fn rust_uv_udp_getsockname(handle: *uv_udp_t, name: *sockaddr_storage) -> c_int;
1040: fn rust_uv_free_sockaddr_storage(ss: *sockaddr_storage);
libstd/rt/uv/uvio.rs:
159: getsockname(handle.native_handle() as *c_void, r_addr as *uvll::sockaddr_storage)
libstd/rt/uv/uvll.rs:451:1-451:1 -fn- definition:
pub unsafe fn udp_init(loop_handle: *uv_loop_t, handle: *uv_udp_t) -> c_int {
references:-libstd/rt/uv/net.rs:
347: assert_eq!(0, uvll::udp_init(loop_.native_handle(), handle));
libstd/rt/uv/uvll.rs:342:1-342:1 -fn- definition:
pub unsafe fn malloc_handle(handle: uv_handle_type) -> *c_void {
references:-libstd/rt/uv/net.rs:
345: let handle = malloc_handle(UV_UDP);
250: let handle = malloc_handle(UV_TCP);
libstd/rt/uv/timer.rs:
23: let handle = uvll::malloc_handle(uvll::UV_TIMER);
libstd/rt/uv/async.rs:
25: let handle = uvll::malloc_handle(UV_ASYNC);
libstd/rt/uv/process.rs:
31: let handle = unsafe { uvll::malloc_handle(uvll::UV_PROCESS) };
libstd/rt/uv/pipe.rs:
25: let handle = uvll::malloc_handle(uvll::UV_NAMED_PIPE);
libstd/rt/uv/uvll.rs:506:1-506:1 -fn- definition:
pub unsafe fn udp_getsockname(handle: *uv_udp_t, name: *sockaddr_storage) -> c_int {
references:-libstd/rt/uv/uvio.rs:
151: Udp => uvll::udp_getsockname,
libstd/rt/uv/uvll.rs:845:1-845:1 -fn- definition:
pub unsafe fn process_pid(p: *uv_process_t) -> c_int {
references:-libstd/rt/uv/process.rs:
123: unsafe { uvll::process_pid(**self) as libc::pid_t }
libstd/rt/uv/uvll.rs:924:2-924:2 -fn- definition:
}
pub unsafe fn set_data_for_uv_handle<T, U>(handle: *T, data: *U) {
references:-libstd/rt/uv/mod.rs:
191: uvll::set_data_for_uv_handle(self.native_handle(), data);
207: uvll::set_data_for_uv_handle(self.native_handle(), null::<()>());
libstd/rt/uv/uvll.rs:421:1-421:1 -fn- definition:
pub unsafe fn idle_new() -> *uv_idle_t {
references:-libstd/rt/uv/idle.rs:
23: let handle = uvll::idle_new();
libstd/rt/uv/uvll.rs:929:2-929:2 -fn- definition:
}
pub unsafe fn get_data_for_req<T>(req: *T) -> *c_void {
references:-libstd/rt/uv/file.rs:
315: let data = uvll::get_data_for_req(self.native_handle());
261: let data = uvll::get_data_for_req((self.native_handle()));
libstd/rt/uv/addrinfo.rs:
132: let data = uvll::get_data_for_req(self.native_handle());
124: let data = uvll::get_data_for_req(self.native_handle());
libstd/rt/uv/uvll.rs:525:1-525:1 -fn- definition:
pub unsafe fn udp_set_multicast_ttl(handle: *uv_udp_t, ttl: c_int) -> c_int {
references:-libstd/rt/uv/uvio.rs:
1299: uvll::udp_set_multicast_ttl(self_.watcher.native_handle(), ttl as c_int)
libstd/rt/uv/uvll.rs:697:1-697:1 -fn- definition:
pub unsafe fn is_ip6_addr(addr: *sockaddr) -> bool {
references:-libstd/rt/uv/net.rs:
32: assert!((is_ip4_addr(addr) || is_ip6_addr(addr)));
33: assert!(!(is_ip4_addr(addr) && is_ip6_addr(addr)));
36: _ if is_ip6_addr(addr) => UvIpv6SocketAddr(addr as *uvll::sockaddr_in6),
libstd/rt/uv/uvio.rs:
168: if uvll::is_ip6_addr(r_addr as *uvll::sockaddr) {
libstd/rt/uv/uvll.rs:122:28-122:28 -ty- definition:
pub type uv_udp_t = c_void;
pub type uv_connect_t = c_void;
references:-557: pub unsafe fn tcp_connect6(connect_ptr: *uv_connect_t, tcp_handle_ptr: *uv_tcp_t,
1080: fn rust_uv_get_stream_handle_from_connect_req(connect_req: *uv_connect_t) -> *uv_stream_t;
900: pub unsafe fn get_stream_handle_from_connect_req(connect: *uv_connect_t) -> *uv_stream_t {
550: pub unsafe fn tcp_connect(connect_ptr: *uv_connect_t, tcp_handle_ptr: *uv_tcp_t,
1007: fn rust_uv_tcp_connect6(req: *uv_connect_t, handle: *uv_tcp_t,
207: pub type uv_connect_cb = extern "C" fn(handle: *uv_connect_t,
1003: fn rust_uv_tcp_connect(req: *uv_connect_t, handle: *uv_tcp_t,
libstd/rt/uv/net.rs:
467: struct ConnectRequest(*uvll::uv_connect_t);
475: ConnectRequest(connect_handle as *uvll::uv_connect_t)
490: impl NativeHandle<*uvll::uv_connect_t> for ConnectRequest {
494: fn native_handle(&self) -> *uvll::uv_connect_t {
291: extern fn connect_cb(req: *uvll::uv_connect_t, status: c_int) {
491: fn from_native_handle(handle: *uvll:: uv_connect_t) -> ConnectRequest {
libstd/rt/uv/uvll.rs:189:52-189:52 -ty- definition:
status: c_int);
pub type uv_alloc_cb = extern "C" fn(stream: *uv_stream_t,
references:-1025: on_alloc: uv_alloc_cb,
630: on_alloc: uv_alloc_cb,
488: pub unsafe fn udp_recv_start(server: *uv_udp_t, on_alloc: uv_alloc_cb,
1048: on_alloc: uv_alloc_cb,
libstd/rt/uv/uvll.rs:337:16-337:16 -enum- definition:
#[deriving(Eq)]
pub enum uv_membership {
references:-514: interface_addr: *c_char, membership: uv_membership) -> c_int {
337: #[deriving(Eq)]
337: #[deriving(Eq)]
337: #[deriving(Eq)]
libstd/rt/uv/uvll.rs:651:1-651:1 -fn- definition:
pub unsafe fn async_init(loop_handle: *c_void,
references:-libstd/rt/uv/async.rs:
31: assert_eq!(0, uvll::async_init(loop_.native_handle(), handle, async_cb));
libstd/rt/uv/uvll.rs:569:1-569:1 -fn- definition:
pub unsafe fn tcp_bind6(tcp_server_ptr: *uv_tcp_t, addr_ptr: *sockaddr_in6) -> c_int {
references:-libstd/rt/uv/net.rs:
264: UvIpv6SocketAddr(addr) => uvll::tcp_bind6(self.native_handle(), addr),
libstd/rt/uv/uvll.rs:214:53-214:53 -ty- definition:
status: c_int);
pub type uv_getaddrinfo_cb = extern "C" fn(req: *uv_getaddrinfo_t,
references:-951: getaddrinfo_cb: uv_getaddrinfo_cb,
1092: getaddrinfo_cb: uv_getaddrinfo_cb,
libstd/rt/uv/uvll.rs:795:2-795:2 -fn- definition:
}
pub unsafe fn fs_stat(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char, cb: *u8) -> c_int {
references:-libstd/rt/uv/file.rs:
103: uvll::fs_stat(loop_.native_handle(),
libstd/rt/uv/uvll.rs:97:1-97:1 -struct- definition:
pub struct uv_process_options_t {
references:-836: options: uv_process_options_t) -> c_int {
1097: options: uv_process_options_t) -> c_int;
libstd/rt/uv/process.rs:
80: let options = uvll::uv_process_options_t {
libstd/rt/uv/uvll.rs:121:28-121:28 -ty- definition:
pub type uv_tcp_t = c_void;
pub type uv_udp_t = c_void;
references:-513: pub unsafe fn udp_set_membership(handle: *uv_udp_t, multicast_addr: *c_char,
1017: fn rust_uv_udp_init(loop_handle: *uv_loop_t, handle_ptr: *uv_udp_t) -> c_int;
1030: fn rust_uv_udp_set_membership(handle: *uv_udp_t, multicast_addr: *c_char,
501: pub unsafe fn get_udp_handle_from_send_req(send_req: *uv_udp_send_t) -> *uv_udp_t {
532: pub unsafe fn udp_set_ttl(handle: *uv_udp_t, ttl: c_int) -> c_int {
197: pub type uv_udp_recv_cb = extern "C" fn(handle: *uv_udp_t,
1024: fn rust_uv_udp_recv_start(server: *uv_udp_t,
1028: fn rust_uv_get_udp_handle_from_send_req(req: *uv_udp_send_t) -> *uv_udp_t;
488: pub unsafe fn udp_recv_start(server: *uv_udp_t, on_alloc: uv_alloc_cb,
1019: fn rust_uv_udp_bind6(server: *uv_udp_t, addr: *sockaddr_in6, flags: c_uint) -> c_int;
452: pub unsafe fn udp_init(loop_handle: *uv_loop_t, handle: *uv_udp_t) -> c_int {
507: pub unsafe fn udp_getsockname(handle: *uv_udp_t, name: *sockaddr_storage) -> c_int {
495: pub unsafe fn udp_recv_stop(server: *uv_udp_t) -> c_int {
1020: fn rust_uv_udp_send(req: *uv_udp_send_t, handle: *uv_udp_t, buf_in: *uv_buf_t,
1022: fn rust_uv_udp_send6(req: *uv_udp_send_t, handle: *uv_udp_t, buf_in: *uv_buf_t,
458: pub unsafe fn udp_bind(server: *uv_udp_t, addr: *sockaddr_in, flags: c_uint) -> c_int {
1027: fn rust_uv_udp_recv_stop(server: *uv_udp_t) -> c_int;
1035: fn rust_uv_udp_set_broadcast(handle: *uv_udp_t, on: c_int) -> c_int;
1033: fn rust_uv_udp_set_multicast_ttl(handle: *uv_udp_t, ttl: c_int) -> c_int;
1034: fn rust_uv_udp_set_ttl(handle: *uv_udp_t, ttl: c_int) -> c_int;
1029: fn rust_uv_udp_getsockname(handle: *uv_udp_t, name: *sockaddr_storage) -> c_int;
520: pub unsafe fn udp_set_multicast_loop(handle: *uv_udp_t, on: c_int) -> c_int {
464: pub unsafe fn udp_bind6(server: *uv_udp_t, addr: *sockaddr_in6, flags: c_uint) -> c_int {
1032: fn rust_uv_udp_set_multicast_loop(handle: *uv_udp_t, on: c_int) -> c_int;
1018: fn rust_uv_udp_bind(server: *uv_udp_t, addr: *sockaddr_in, flags: c_uint) -> c_int;
526: pub unsafe fn udp_set_multicast_ttl(handle: *uv_udp_t, ttl: c_int) -> c_int {
538: pub unsafe fn udp_set_broadcast(handle: *uv_udp_t, on: c_int) -> c_int {
libstd/rt/uv/net.rs:
461: fn native_handle(&self) -> *uvll::uv_udp_t {
458: fn from_native_handle(handle: *uvll::uv_udp_t) -> UdpWatcher {
457: impl NativeHandle<*uvll::uv_udp_t> for UdpWatcher {
(339)(447)(378)(384)libstd/rt/uv/uvll.rs:593:1-593:1 -fn- definition:
pub unsafe fn tcp_keepalive(handle: *uv_tcp_t, enable: c_int, delay: c_uint) -> c_int {
references:-libstd/rt/uv/uvio.rs:
1131: uvll::tcp_keepalive(self_.watcher.native_handle(), 0 as c_int, 0 as c_uint)
1117: uvll::tcp_keepalive(self_.watcher.native_handle(), 1 as c_int,
libstd/rt/uv/uvll.rs:519:1-519:1 -fn- definition:
pub unsafe fn udp_set_multicast_loop(handle: *uv_udp_t, on: c_int) -> c_int {
references:-libstd/rt/uv/uvio.rs:
1271: uvll::udp_set_multicast_loop(self_.watcher.native_handle(), 1 as c_int)
1285: uvll::udp_set_multicast_loop(self_.watcher.native_handle(), 0 as c_int)
libstd/rt/uv/uvll.rs:112:20-112:20 -struct- definition:
// functions below.
pub struct uv_stdio_container_t {
references:-1100: fn rust_set_stdio_container_flags(c: *uv_stdio_container_t, flags: c_int);
857: pub unsafe fn set_stdio_container_fd(c: *uv_stdio_container_t,
1101: fn rust_set_stdio_container_fd(c: *uv_stdio_container_t, fd: c_int);
863: pub unsafe fn set_stdio_container_stream(c: *uv_stdio_container_t,
1102: fn rust_set_stdio_container_stream(c: *uv_stdio_container_t,
106: stdio: *uv_stdio_container_t,
851: pub unsafe fn set_stdio_container_flags(c: *uv_stdio_container_t,
libstd/rt/uv/process.rs:
66: let mut stdio = vec::with_capacity::<uvll::uv_stdio_container_t>(io.len());
71: let io = set_stdio(slot as *uvll::uv_stdio_container_t, other);
146: unsafe fn set_stdio(dst: *uvll::uv_stdio_container_t,
libstd/rt/uv/uvll.rs:445:1-445:1 -fn- definition:
pub unsafe fn idle_stop(handle: *uv_idle_t) -> c_int {
references:-libstd/rt/uv/idle.rs:
71: assert!(0 == uvll::idle_stop(self.native_handle()));
libstd/rt/uv/uvll.rs:716:1-716:1 -fn- definition:
pub unsafe fn malloc_sockaddr_storage() -> *sockaddr_storage {
references:-libstd/rt/uv/uvio.rs:
156: let r_addr = unsafe { uvll::malloc_sockaddr_storage() };
libstd/rt/uv/uvll.rs:427:1-427:1 -fn- definition:
pub unsafe fn idle_delete(handle: *uv_idle_t) {
references:-libstd/rt/uv/idle.rs:
93: uvll::idle_delete(handle);
libstd/rt/uv/uvll.rs:439:1-439:1 -fn- definition:
pub unsafe fn idle_start(handle: *uv_idle_t, cb: uv_idle_cb) -> c_int {
references:-libstd/rt/uv/idle.rs:
39: assert!(0 == uvll::idle_start(self.native_handle(), idle_cb))
53: assert!(0 == uvll::idle_start(self.native_handle(), idle_cb))
libstd/rt/uv/uvll.rs:777:2-777:2 -fn- definition:
}
pub unsafe fn fs_write(loop_ptr: *uv_loop_t, req: *uv_fs_t, fd: c_int, buf: *c_void,
references:-libstd/rt/uv/file.rs:
117: uvll::fs_write(loop_.native_handle(), self.native_handle(),
131: uvll::fs_write(loop_.native_handle(), self.native_handle(),
libstd/rt/uv/uvll.rs:587:1-587:1 -fn- definition:
pub unsafe fn tcp_nodelay(handle: *uv_tcp_t, enable: c_int) -> c_int {
references:-libstd/rt/uv/uvio.rs:
1105: let r = unsafe { uvll::tcp_nodelay(self_.watcher.native_handle(), 1 as c_int) };
1094: let r = unsafe { uvll::tcp_nodelay(self_.watcher.native_handle(), 0 as c_int) };
libstd/rt/uv/uvll.rs:124:35-124:35 -ty- definition:
pub type uv_connection_t = c_void;
pub type uv_write_t = c_void;
references:-619: pub unsafe fn write<T>(req: *uv_write_t,
905: pub unsafe fn get_stream_handle_from_write_req(write_req: *uv_write_t) -> *uv_stream_t {
1081: fn rust_uv_get_stream_handle_from_write_req(write_req: *uv_write_t) -> *uv_stream_t;
213: pub type uv_write_cb = extern "C" fn(handle: *uv_write_t,
libstd/rt/uv/file.rs:
249: let fs_req = (self.native_handle()) as *uvll::uv_write_t;
libstd/rt/uv/net.rs:
526: fn native_handle(&self) -> *uvll::uv_write_t {
523: fn from_native_handle(handle: *uvll:: uv_write_t) -> WriteRequest {
522: impl NativeHandle<*uvll::uv_write_t> for WriteRequest {
499: pub struct WriteRequest(*uvll::uv_write_t);
507: WriteRequest(write_handle as *uvll::uv_write_t)
199: extern fn write_cb(req: *uvll::uv_write_t, status: c_int) {
libstd/rt/uv/uvll.rs:734:1-734:1 -fn- definition:
pub unsafe fn free_ip6_addr(addr: *sockaddr_in6) {
references:-libstd/rt/uv/net.rs:
53: Ipv6Addr(*) => free_ip6_addr,
libstd/rt/uv/uvll.rs:433:1-433:1 -fn- definition:
pub unsafe fn idle_init(loop_handle: *uv_loop_t, handle: *uv_idle_t) -> c_int {
references:-libstd/rt/uv/idle.rs:
25: assert!(0 == uvll::idle_init(loop_.native_handle(), handle));
libstd/rt/uv/uvll.rs:556:1-556:1 -fn- definition:
pub unsafe fn tcp_connect6(connect_ptr: *uv_connect_t, tcp_handle_ptr: *uv_tcp_t,
references:-libstd/rt/uv/net.rs:
285: UvIpv6SocketAddr(addr) => uvll::tcp_connect6(connect_handle,
libstd/rt/uv/uvll.rs:206:53-206:53 -ty- definition:
status: c_int);
pub type uv_connect_cb = extern "C" fn(handle: *uv_connect_t,
references:-1004: cb: uv_connect_cb,
551: addr_ptr: *sockaddr_in, after_connect_cb: uv_connect_cb) -> c_int {
558: addr_ptr: *sockaddr_in6, after_connect_cb: uv_connect_cb) -> c_int {
1008: cb: uv_connect_cb,
libstd/rt/uv/uvll.rs:531:1-531:1 -fn- definition:
pub unsafe fn udp_set_ttl(handle: *uv_udp_t, ttl: c_int) -> c_int {
references:-libstd/rt/uv/uvio.rs:
1313: uvll::udp_set_ttl(self_.watcher.native_handle(), ttl as c_int)
libstd/rt/uv/uvll.rs:409:1-409:1 -fn- definition:
pub unsafe fn close<T>(handle: *T, cb: uv_close_cb) {
references:-libstd/rt/uv/net.rs:
445: unsafe { uvll::close(self.native_handle(), close_cb); }
223: unsafe { uvll::close(self.native_handle(), close_cb); }
libstd/rt/uv/idle.rs:
83: unsafe { uvll::close(self.native_handle(), close_cb) };
libstd/rt/uv/timer.rs:
66: uvll::close(watcher.native_handle(), close_cb);
libstd/rt/uv/async.rs:
58: uvll::close(self.native_handle(), close_cb);
libstd/rt/uv/process.rs:
135: unsafe { uvll::close(self.native_handle(), close_cb); }
libstd/rt/uv/pipe.rs:
48: unsafe { uvll::close(self.native_handle(), close_cb); }
libstd/rt/uv/uvll.rs:811:2-811:2 -fn- definition:
}
pub unsafe fn fs_rmdir(loop_ptr: *uv_loop_t, req: *uv_fs_t, path: *c_char,
references:-libstd/rt/uv/file.rs:
209: uvll::fs_rmdir(loop_.native_handle(),
libstd/rt/uv/uvll.rs:117:1-117:1 -ty- definition:
pub type uv_handle_t = c_void;
references:-203: pub type uv_walk_cb = extern "C" fn(handle: *uv_handle_t,
202: pub type uv_close_cb = extern "C" fn(handle: *uv_handle_t);
libstd/rt/uv/uvll.rs:212:53-212:53 -ty- definition:
status: c_int);
pub type uv_write_cb = extern "C" fn(handle: *uv_write_t,
references:-622: cb: uv_write_cb) -> c_int {
1046: cb: uv_write_cb) -> c_int;
libstd/rt/uv/uvll.rs:391:46-391:46 -fn- definition:
// XXX Event loops ignore SIGPIPE by default.
pub unsafe fn loop_new() -> *c_void {
references:-libstd/rt/uv/mod.rs:
104: let handle = unsafe { uvll::loop_new() };
libstd/rt/uv/uvll.rs:463:1-463:1 -fn- definition:
pub unsafe fn udp_bind6(server: *uv_udp_t, addr: *sockaddr_in6, flags: c_uint) -> c_int {
references:-libstd/rt/uv/net.rs:
359: UvIpv6SocketAddr(addr) => uvll::udp_bind6(self.native_handle(), addr, 0u32),
libstd/rt/uv/uvll.rs:856:1-856:1 -fn- definition:
pub unsafe fn set_stdio_container_fd(c: *uv_stdio_container_t,
references:-libstd/rt/uv/process.rs:
155: uvll::set_stdio_container_fd(dst, fd);
libstd/rt/uv/uvll.rs:709:2-709:2 -fn- definition:
}
pub unsafe fn malloc_ip6_addr(ip: &str, port: int) -> *sockaddr_in6 {
references:-libstd/rt/uv/net.rs:
45: Ipv6Addr(*) => malloc_ip6_addr,
libstd/rt/uv/uvll.rs:691:1-691:1 -fn- definition:
pub unsafe fn is_ip4_addr(addr: *sockaddr) -> bool {
references:-libstd/rt/uv/net.rs:
32: assert!((is_ip4_addr(addr) || is_ip6_addr(addr)));
35: _ if is_ip4_addr(addr) => UvIpv4SocketAddr(addr as *uvll::sockaddr_in),
33: assert!(!(is_ip4_addr(addr) && is_ip6_addr(addr)));
libstd/rt/uv/uvll.rs:934:2-934:2 -fn- definition:
}
pub unsafe fn set_data_for_req<T, U>(req: *T, data: *U) {
references:-libstd/rt/uv/file.rs:
317: uvll::set_data_for_req(self.native_handle(), null::<()>());
255: uvll::set_data_for_req(fs_req, data);
libstd/rt/uv/addrinfo.rs:
134: uvll::set_data_for_req(self.native_handle(), null::<()>());
118: uvll::set_data_for_req(req, data);
libstd/rt/uv/uvll.rs:840:1-840:1 -fn- definition:
pub unsafe fn process_kill(p: *uv_process_t, signum: c_int) -> c_int {
references:-libstd/rt/uv/process.rs:
114: uvll::process_kill(self.native_handle(), signum as libc::c_int)
libstd/rt/uv/uvll.rs:221:1-221:1 -ty- definition:
pub type sockaddr = c_void;
references:-239: ai_addr: *sockaddr,
692: pub unsafe fn is_ip4_addr(addr: *sockaddr) -> bool {
698: pub unsafe fn is_ip6_addr(addr: *sockaddr) -> bool {
1037: fn rust_uv_is_ipv4_sockaddr(addr: *sockaddr) -> c_int;
200: addr: *sockaddr,
1038: fn rust_uv_is_ipv6_sockaddr(addr: *sockaddr) -> c_int;
libstd/rt/uv/net.rs:
30: fn sockaddr_to_UvSocketAddr(addr: *uvll::sockaddr) -> UvSocketAddr {
385: addr: *uvll::sockaddr, flags: c_uint) {
libstd/rt/uv/uvio.rs:
168: if uvll::is_ip6_addr(r_addr as *uvll::sockaddr) {
libstd/rt/uv/uvll.rs:949:2-949:2 -fn- definition:
}
pub unsafe fn getaddrinfo(loop_: *uv_loop_t, req: *uv_getaddrinfo_t,
references:-libstd/rt/uv/addrinfo.rs:
81: assert!(0 == uvll::getaddrinfo(loop_.native_handle(),
libstd/rt/uv/uvll.rs:758:1-758:1 -fn- definition:
pub unsafe fn ip6_port(addr: *sockaddr_in6) -> c_uint {
references:-libstd/rt/uv/net.rs:
83: UvIpv6SocketAddr(addr) => uvll::ip6_port(addr),
libstd/rt/uv/uvll.rs:202:60-202:60 -ty- definition:
pub type uv_close_cb = extern "C" fn(handle: *uv_handle_t);
pub type uv_walk_cb = extern "C" fn(handle: *uv_handle_t,
references:-979: fn rust_uv_walk(loop_handle: *c_void, cb: uv_walk_cb, arg: *c_void);
416: pub unsafe fn walk(loop_handle: *c_void, cb: uv_walk_cb, arg: *c_void) {