WPILibC++ 2025.2.1
Loading...
Searching...
No Matches
uv.h
Go to the documentation of this file.
1/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to
5 * deal in the Software without restriction, including without limitation the
6 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 * sell copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
9 *
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
12 *
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 * IN THE SOFTWARE.
20 */
21
22/* See https://github.com/libuv/libuv#documentation for documentation. */
23
24#ifndef UV_H
25#define UV_H
26
27#if defined(BUILDING_UV_SHARED) && defined(USING_UV_SHARED)
28#error "Define either BUILDING_UV_SHARED or USING_UV_SHARED, not both."
29#endif
30
31#ifndef UV_EXTERN
32#ifdef _WIN32
33 /* Windows - set up dll import/export decorators. */
34# if defined(BUILDING_UV_SHARED)
35 /* Building shared library. */
36# define UV_EXTERN __declspec(dllexport)
37# elif defined(USING_UV_SHARED)
38 /* Using shared library. */
39# define UV_EXTERN __declspec(dllimport)
40# else
41 /* Building static library. */
42# define UV_EXTERN /* nothing */
43# endif
44#elif __GNUC__ >= 4
45# define UV_EXTERN __attribute__((visibility("default")))
46#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) /* Sun Studio >= 8 */
47# define UV_EXTERN __global
48#else
49# define UV_EXTERN /* nothing */
50#endif
51#endif /* UV_EXTERN */
52
53#include "uv/errno.h"
54#include "uv/version.h"
55#include <stddef.h>
56#include <stdio.h>
57#include <stdint.h>
58
59/* Internal type, do not use. */
60struct uv__queue {
61 struct uv__queue* next;
62 struct uv__queue* prev;
63};
64
65#if defined(_WIN32)
66# include "uv/win.h"
67#else
68# include "uv/unix.h"
69#endif
70
71/* Expand this list if necessary. */
72#define UV_ERRNO_MAP(XX) \
73 XX(E2BIG, "argument list too long") \
74 XX(EACCES, "permission denied") \
75 XX(EADDRINUSE, "address already in use") \
76 XX(EADDRNOTAVAIL, "address not available") \
77 XX(EAFNOSUPPORT, "address family not supported") \
78 XX(EAGAIN, "resource temporarily unavailable") \
79 XX(EAI_ADDRFAMILY, "address family not supported") \
80 XX(EAI_AGAIN, "temporary failure") \
81 XX(EAI_BADFLAGS, "bad ai_flags value") \
82 XX(EAI_BADHINTS, "invalid value for hints") \
83 XX(EAI_CANCELED, "request canceled") \
84 XX(EAI_FAIL, "permanent failure") \
85 XX(EAI_FAMILY, "ai_family not supported") \
86 XX(EAI_MEMORY, "out of memory") \
87 XX(EAI_NODATA, "no address") \
88 XX(EAI_NONAME, "unknown node or service") \
89 XX(EAI_OVERFLOW, "argument buffer overflow") \
90 XX(EAI_PROTOCOL, "resolved protocol is unknown") \
91 XX(EAI_SERVICE, "service not available for socket type") \
92 XX(EAI_SOCKTYPE, "socket type not supported") \
93 XX(EALREADY, "connection already in progress") \
94 XX(EBADF, "bad file descriptor") \
95 XX(EBUSY, "resource busy or locked") \
96 XX(ECANCELED, "operation canceled") \
97 XX(ECHARSET, "invalid Unicode character") \
98 XX(ECONNABORTED, "software caused connection abort") \
99 XX(ECONNREFUSED, "connection refused") \
100 XX(ECONNRESET, "connection reset by peer") \
101 XX(EDESTADDRREQ, "destination address required") \
102 XX(EEXIST, "file already exists") \
103 XX(EFAULT, "bad address in system call argument") \
104 XX(EFBIG, "file too large") \
105 XX(EHOSTUNREACH, "host is unreachable") \
106 XX(EINTR, "interrupted system call") \
107 XX(EINVAL, "invalid argument") \
108 XX(EIO, "i/o error") \
109 XX(EISCONN, "socket is already connected") \
110 XX(EISDIR, "illegal operation on a directory") \
111 XX(ELOOP, "too many symbolic links encountered") \
112 XX(EMFILE, "too many open files") \
113 XX(EMSGSIZE, "message too long") \
114 XX(ENAMETOOLONG, "name too long") \
115 XX(ENETDOWN, "network is down") \
116 XX(ENETUNREACH, "network is unreachable") \
117 XX(ENFILE, "file table overflow") \
118 XX(ENOBUFS, "no buffer space available") \
119 XX(ENODEV, "no such device") \
120 XX(ENOENT, "no such file or directory") \
121 XX(ENOMEM, "not enough memory") \
122 XX(ENONET, "machine is not on the network") \
123 XX(ENOPROTOOPT, "protocol not available") \
124 XX(ENOSPC, "no space left on device") \
125 XX(ENOSYS, "function not implemented") \
126 XX(ENOTCONN, "socket is not connected") \
127 XX(ENOTDIR, "not a directory") \
128 XX(ENOTEMPTY, "directory not empty") \
129 XX(ENOTSOCK, "socket operation on non-socket") \
130 XX(ENOTSUP, "operation not supported on socket") \
131 XX(EOVERFLOW, "value too large for defined data type") \
132 XX(EPERM, "operation not permitted") \
133 XX(EPIPE, "broken pipe") \
134 XX(EPROTO, "protocol error") \
135 XX(EPROTONOSUPPORT, "protocol not supported") \
136 XX(EPROTOTYPE, "protocol wrong type for socket") \
137 XX(ERANGE, "result too large") \
138 XX(EROFS, "read-only file system") \
139 XX(ESHUTDOWN, "cannot send after transport endpoint shutdown") \
140 XX(ESPIPE, "invalid seek") \
141 XX(ESRCH, "no such process") \
142 XX(ETIMEDOUT, "connection timed out") \
143 XX(ETXTBSY, "text file is busy") \
144 XX(EXDEV, "cross-device link not permitted") \
145 XX(UNKNOWN, "unknown error") \
146 XX(EOF, "end of file") \
147 XX(ENXIO, "no such device or address") \
148 XX(EMLINK, "too many links") \
149 XX(EHOSTDOWN, "host is down") \
150 XX(EREMOTEIO, "remote I/O error") \
151 XX(ENOTTY, "inappropriate ioctl for device") \
152 XX(EFTYPE, "inappropriate file type or format") \
153 XX(EILSEQ, "illegal byte sequence") \
154 XX(ESOCKTNOSUPPORT, "socket type not supported") \
155 XX(ENODATA, "no data available") \
156 XX(EUNATCH, "protocol driver not attached") \
157
158#define UV_HANDLE_TYPE_MAP(XX) \
159 XX(ASYNC, async) \
160 XX(CHECK, check) \
161 XX(FS_EVENT, fs_event) \
162 XX(FS_POLL, fs_poll) \
163 XX(HANDLE, handle) \
164 XX(IDLE, idle) \
165 XX(NAMED_PIPE, pipe) \
166 XX(POLL, poll) \
167 XX(PREPARE, prepare) \
168 XX(PROCESS, process) \
169 XX(STREAM, stream) \
170 XX(TCP, tcp) \
171 XX(TIMER, timer) \
172 XX(TTY, tty) \
173 XX(UDP, udp) \
174 XX(SIGNAL, signal) \
175
176#define UV_REQ_TYPE_MAP(XX) \
177 XX(REQ, req) \
178 XX(CONNECT, connect) \
179 XX(WRITE, write) \
180 XX(SHUTDOWN, shutdown) \
181 XX(UDP_SEND, udp_send) \
182 XX(FS, fs) \
183 XX(WORK, work) \
184 XX(GETADDRINFO, getaddrinfo) \
185 XX(GETNAMEINFO, getnameinfo) \
186 XX(RANDOM, random) \
187
188typedef enum {
189#define XX(code, _) UV_ ## code = UV__ ## code,
191#undef XX
194
195typedef enum {
197#define XX(uc, lc) UV_##uc,
199#undef XX
203
204typedef enum {
206#define XX(uc, lc) UV_##uc,
208#undef XX
212
213
214/* Handle types. */
215typedef struct uv_loop_s uv_loop_t;
217typedef struct uv_dir_s uv_dir_t;
219typedef struct uv_tcp_s uv_tcp_t;
220typedef struct uv_udp_s uv_udp_t;
221typedef struct uv_pipe_s uv_pipe_t;
222typedef struct uv_tty_s uv_tty_t;
223typedef struct uv_poll_s uv_poll_t;
224typedef struct uv_timer_s uv_timer_t;
226typedef struct uv_check_s uv_check_t;
227typedef struct uv_idle_s uv_idle_t;
228typedef struct uv_async_s uv_async_t;
233
234/* Request types. */
235typedef struct uv_req_s uv_req_t;
239typedef struct uv_write_s uv_write_t;
242typedef struct uv_fs_s uv_fs_t;
243typedef struct uv_work_s uv_work_t;
245
246/* None of the above. */
252typedef struct uv_group_s uv_group_t;
255
257
258typedef enum {
262#define UV_LOOP_USE_IO_URING_SQPOLL UV_LOOP_USE_IO_URING_SQPOLL
264
270
271
272UV_EXTERN unsigned int uv_version(void);
273UV_EXTERN const char* uv_version_string(void);
274
275typedef void* (*uv_malloc_func)(size_t size);
276typedef void* (*uv_realloc_func)(void* ptr, size_t size);
277typedef void* (*uv_calloc_func)(size_t count, size_t size);
278typedef void (*uv_free_func)(void* ptr);
279
281
283 uv_realloc_func realloc_func,
284 uv_calloc_func calloc_func,
285 uv_free_func free_func);
286
290/*
291 * NOTE:
292 * This function is DEPRECATED, users should
293 * allocate the loop manually and use uv_loop_init instead.
294 */
296/*
297 * NOTE:
298 * This function is DEPRECATED. Users should use
299 * uv_loop_close and free the memory manually instead.
300 */
306
309
313
315UV_EXTERN uint64_t uv_now(const uv_loop_t*);
316
319
320typedef void (*uv_alloc_cb)(uv_handle_t* handle,
321 size_t suggested_size,
322 uv_buf_t* buf);
323typedef void (*uv_read_cb)(uv_stream_t* stream,
324 ssize_t nread,
325 const uv_buf_t* buf);
326typedef void (*uv_write_cb)(uv_write_t* req, int status);
327typedef void (*uv_connect_cb)(uv_connect_t* req, int status);
328typedef void (*uv_shutdown_cb)(uv_shutdown_t* req, int status);
329typedef void (*uv_connection_cb)(uv_stream_t* server, int status);
330typedef void (*uv_close_cb)(uv_handle_t* handle);
331typedef void (*uv_poll_cb)(uv_poll_t* handle, int status, int events);
332typedef void (*uv_timer_cb)(uv_timer_t* handle);
333typedef void (*uv_async_cb)(uv_async_t* handle);
334typedef void (*uv_prepare_cb)(uv_prepare_t* handle);
335typedef void (*uv_check_cb)(uv_check_t* handle);
336typedef void (*uv_idle_cb)(uv_idle_t* handle);
337typedef void (*uv_exit_cb)(uv_process_t*, int64_t exit_status, int term_signal);
338typedef void (*uv_walk_cb)(uv_handle_t* handle, void* arg);
339typedef void (*uv_fs_cb)(uv_fs_t* req);
340typedef void (*uv_work_cb)(uv_work_t* req);
341typedef void (*uv_after_work_cb)(uv_work_t* req, int status);
343 int status,
344 struct addrinfo* res);
346 int status,
347 const char* hostname,
348 const char* service);
349typedef void (*uv_random_cb)(uv_random_t* req,
350 int status,
351 void* buf,
352 size_t buflen);
353
358
359/* XXX(bnoordhuis) not 2038-proof, https://github.com/libuv/libuv/issues/3864 */
360typedef struct {
361 long tv_sec;
364
365typedef struct {
366 int64_t tv_sec;
367 int32_t tv_nsec;
369
370/* XXX(bnoordhuis) not 2038-proof, https://github.com/libuv/libuv/issues/3864 */
371typedef struct {
372 long tv_sec;
375
376typedef struct {
377 int64_t tv_sec;
378 int32_t tv_usec;
380
381typedef struct {
382 uint64_t st_dev;
383 uint64_t st_mode;
384 uint64_t st_nlink;
385 uint64_t st_uid;
386 uint64_t st_gid;
387 uint64_t st_rdev;
388 uint64_t st_ino;
389 uint64_t st_size;
390 uint64_t st_blksize;
391 uint64_t st_blocks;
392 uint64_t st_flags;
393 uint64_t st_gen;
398} uv_stat_t;
399
400
401typedef void (*uv_fs_event_cb)(uv_fs_event_t* handle,
402 const char* filename,
403 int events,
404 int status);
405
406typedef void (*uv_fs_poll_cb)(uv_fs_poll_t* handle,
407 int status,
408 const uv_stat_t* prev,
409 const uv_stat_t* curr);
410
411typedef void (*uv_signal_cb)(uv_signal_t* handle, int signum);
412
413
418
419
421
422UV_EXTERN const char* uv_strerror(int err);
423UV_EXTERN char* uv_strerror_r(int err, char* buf, size_t buflen);
424
425UV_EXTERN const char* uv_err_name(int err);
426UV_EXTERN char* uv_err_name_r(int err, char* buf, size_t buflen);
427
428
429#define UV_REQ_FIELDS \
430 /* public */ \
431 void* data; \
432 /* read-only */ \
433 uv_req_type type; \
434 /* private */ \
435 void* reserved[6]; \
436 UV_REQ_PRIVATE_FIELDS \
437
438/* Abstract base class of all requests. */
439struct uv_req_s {
441};
442
443
444/* Platform-specific request types. */
446
447
449 uv_stream_t* handle,
450 uv_shutdown_cb cb);
451
458
459
460#define UV_HANDLE_FIELDS \
461 /* public */ \
462 void* data; \
463 /* read-only */ \
464 uv_loop_t* loop; \
465 uv_handle_type type; \
466 /* private */ \
467 uv_close_cb close_cb; \
468 struct uv__queue handle_queue; \
469 union { \
470 int fd; \
471 void* reserved[4]; \
472 } u; \
473 UV_HANDLE_PRIVATE_FIELDS \
474
475/* The abstract base class of all handles. */
478};
479
485UV_EXTERN void uv_handle_set_data(uv_handle_t* handle, void* data);
486
489UV_EXTERN void uv_req_set_data(uv_req_t* req, void* data);
492
494
495UV_EXTERN void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg);
496
497/* Helpers for ad hoc debugging, no API/ABI stability guaranteed. */
498UV_EXTERN void uv_print_all_handles(uv_loop_t* loop, FILE* stream);
500
502
505
507
508UV_EXTERN uv_buf_t uv_buf_init(char* base, unsigned int len);
509
510UV_EXTERN int uv_pipe(uv_file fds[2], int read_flags, int write_flags);
512 int protocol,
513 uv_os_sock_t socket_vector[2],
514 int flags0,
515 int flags1);
516
517#define UV_STREAM_FIELDS \
518 /* number of bytes queued for writing */ \
519 size_t write_queue_size; \
520 uv_alloc_cb alloc_cb; \
521 uv_read_cb read_cb; \
522 /* private */ \
523 UV_STREAM_PRIVATE_FIELDS
524
525/*
526 * uv_stream_t is a subclass of uv_handle_t.
527 *
528 * uv_stream is an abstract class.
529 *
530 * uv_stream_t is the parent class of uv_tcp_t, uv_pipe_t and uv_tty_t.
531 */
536
538
539UV_EXTERN int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb);
541
543 uv_alloc_cb alloc_cb,
544 uv_read_cb read_cb);
546
548 uv_stream_t* handle,
549 const uv_buf_t bufs[],
550 unsigned int nbufs,
551 uv_write_cb cb);
553 uv_stream_t* handle,
554 const uv_buf_t bufs[],
555 unsigned int nbufs,
556 uv_stream_t* send_handle,
557 uv_write_cb cb);
559 const uv_buf_t bufs[],
560 unsigned int nbufs);
562 const uv_buf_t bufs[],
563 unsigned int nbufs,
564 uv_stream_t* send_handle);
565
566/* uv_write_t is a subclass of uv_req_t. */
570 uv_stream_t* send_handle; /* TODO: make private and unix-only in v2.x. */
573};
574
575
578
580
582
583
584/*
585 * uv_tcp_t is a subclass of uv_stream_t.
586 *
587 * Represents a TCP stream or TCP server.
588 */
594
596UV_EXTERN int uv_tcp_init_ex(uv_loop_t*, uv_tcp_t* handle, unsigned int flags);
598UV_EXTERN int uv_tcp_nodelay(uv_tcp_t* handle, int enable);
600 int enable,
601 unsigned int delay);
603
605 /* Used with uv_tcp_bind, when an IPv6 address is used. */
607
608 /* Enable SO_REUSEPORT socket option when binding the handle.
609 * This allows completely duplicate bindings by multiple processes
610 * or threads if they all set SO_REUSEPORT before binding the port.
611 * Incoming connections are distributed across the participating
612 * listener sockets.
613 *
614 * This flag is available only on Linux 3.9+, DragonFlyBSD 3.6+,
615 * FreeBSD 12.0+, Solaris 11.4, and AIX 7.2.5+ for now.
616 */
618};
619
621 const struct sockaddr* addr,
622 unsigned int flags);
624 struct sockaddr* name,
625 int* namelen);
627 struct sockaddr* name,
628 int* namelen);
631 uv_tcp_t* handle,
632 const struct sockaddr* addr,
633 uv_connect_cb cb);
634
635/* uv_connect_t is a subclass of uv_req_t. */
642
643
644/*
645 * UDP support.
646 */
647
649 /* Disables dual stack mode. */
651 /*
652 * Indicates message was truncated because read buffer was too small. The
653 * remainder was discarded by the OS. Used in uv_udp_recv_cb.
654 */
656 /*
657 * Indicates if SO_REUSEADDR will be set when binding the handle.
658 * This sets the SO_REUSEPORT socket flag on the BSDs (except for
659 * DragonFlyBSD), OS X, and other platforms where SO_REUSEPORTs don't
660 * have the capability of load balancing, as the opposite of what
661 * UV_UDP_REUSEPORT would do. On other Unix platforms, it sets the
662 * SO_REUSEADDR flag. What that means is that multiple threads or
663 * processes can bind to the same address without error (provided
664 * they all set the flag) but only the last one to bind will receive
665 * any traffic, in effect "stealing" the port from the previous listener.
666 */
668 /*
669 * Indicates that the message was received by recvmmsg, so the buffer provided
670 * must not be freed by the recv_cb callback.
671 */
673 /*
674 * Indicates that the buffer provided has been fully utilized by recvmmsg and
675 * that it should now be freed by the recv_cb callback. When this flag is set
676 * in uv_udp_recv_cb, nread will always be 0 and addr will always be NULL.
677 */
679 /*
680 * Indicates if IP_RECVERR/IPV6_RECVERR will be set when binding the handle.
681 * This sets IP_RECVERR for IPv4 and IPV6_RECVERR for IPv6 UDP sockets on
682 * Linux. This stops the Linux kernel from suppressing some ICMP error
683 * messages and enables full ICMP error reporting for faster failover.
684 * This flag is no-op on platforms other than Linux.
685 */
687 /*
688 * Indicates if SO_REUSEPORT will be set when binding the handle.
689 * This sets the SO_REUSEPORT socket option on supported platforms.
690 * Unlike UV_UDP_REUSEADDR, this flag will make multiple threads or
691 * processes that are binding to the same address and port "share"
692 * the port, which means incoming datagrams are distributed across
693 * the receiving sockets among threads or processes.
694 *
695 * This flag is available only on Linux 3.9+, DragonFlyBSD 3.6+,
696 * FreeBSD 12.0+, Solaris 11.4, and AIX 7.2.5+ for now.
697 */
699 /*
700 * Indicates that recvmmsg should be used, if available.
701 */
702 UV_UDP_RECVMMSG = 256
704
705typedef void (*uv_udp_send_cb)(uv_udp_send_t* req, int status);
706typedef void (*uv_udp_recv_cb)(uv_udp_t* handle,
707 ssize_t nread,
708 const uv_buf_t* buf,
709 const struct sockaddr* addr,
710 unsigned flags);
711
712/* uv_udp_t is a subclass of uv_handle_t. */
713struct uv_udp_s {
715 /* read-only */
716 /*
717 * Number of bytes queued for sending. This field strictly shows how much
718 * information is currently queued.
719 */
721 /*
722 * Number of send requests currently in the queue awaiting to be processed.
723 */
726};
727
728/* uv_udp_send_t is a subclass of uv_req_t. */
735
737UV_EXTERN int uv_udp_init_ex(uv_loop_t*, uv_udp_t* handle, unsigned int flags);
740 const struct sockaddr* addr,
741 unsigned int flags);
742UV_EXTERN int uv_udp_connect(uv_udp_t* handle, const struct sockaddr* addr);
743
745 struct sockaddr* name,
746 int* namelen);
748 struct sockaddr* name,
749 int* namelen);
751 const char* multicast_addr,
752 const char* interface_addr,
753 uv_membership membership);
755 const char* multicast_addr,
756 const char* interface_addr,
757 const char* source_addr,
758 uv_membership membership);
762 const char* interface_addr);
764UV_EXTERN int uv_udp_set_ttl(uv_udp_t* handle, int ttl);
766 uv_udp_t* handle,
767 const uv_buf_t bufs[],
768 unsigned int nbufs,
769 const struct sockaddr* addr,
770 uv_udp_send_cb send_cb);
772 const uv_buf_t bufs[],
773 unsigned int nbufs,
774 const struct sockaddr* addr);
776 uv_alloc_cb alloc_cb,
777 uv_udp_recv_cb recv_cb);
782
783
784/*
785 * uv_tty_t is a subclass of uv_stream_t.
786 *
787 * Representing a stream for the console.
788 */
794
795typedef enum {
796 /* Initial/normal terminal mode */
798 /* Raw input mode (On Windows, ENABLE_WINDOW_INPUT is also enabled) */
800 /* Binary-safe I/O mode for IPC (Unix-only) */
803
804typedef enum {
805 /*
806 * The console supports handling of virtual terminal sequences
807 * (Windows10 new console, ConEmu)
808 */
810 /* The console cannot process the virtual terminal sequence. (Legacy
811 * console)
812 */
815
816
820UV_EXTERN int uv_tty_get_winsize(uv_tty_t*, int* width, int* height);
823
824inline int uv_tty_set_mode(uv_tty_t* handle, int mode) {
825 return uv_tty_set_mode(handle, static_cast<uv_tty_mode_t>(mode));
826}
827
829
830enum {
831 UV_PIPE_NO_TRUNCATE = 1u << 0
833
834/*
835 * uv_pipe_t is a subclass of uv_stream_t.
836 *
837 * Representing a pipe stream or pipe server. On Windows this is a Named
838 * Pipe. On Unix this is a Unix domain socket.
839 */
840struct uv_pipe_s {
843 int ipc; /* non-zero if this pipe is used for passing handles */
845};
846
849UV_EXTERN int uv_pipe_bind(uv_pipe_t* handle, const char* name);
851 const char* name,
852 size_t namelen,
853 unsigned int flags);
855 uv_pipe_t* handle,
856 const char* name,
857 uv_connect_cb cb);
859 uv_pipe_t* handle,
860 const char* name,
861 size_t namelen,
862 unsigned int flags,
863 uv_connect_cb cb);
865 char* buffer,
866 size_t* size);
868 char* buffer,
869 size_t* size);
873UV_EXTERN int uv_pipe_chmod(uv_pipe_t* handle, int flags);
874
875
881
888
889UV_EXTERN int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd);
891 uv_poll_t* handle,
892 uv_os_sock_t socket);
893UV_EXTERN int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb);
895
896
901
905
906
911
915
916
921
925
926
931
933 uv_async_t* async,
934 uv_async_cb async_cb);
936
937
938/*
939 * uv_timer_t is a subclass of uv_handle_t.
940 *
941 * Used to get woken up at a specified time in the future.
942 */
947
950 uv_timer_cb cb,
951 uint64_t timeout,
952 uint64_t repeat);
955UV_EXTERN void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat);
958
959
960/*
961 * uv_getaddrinfo_t is a subclass of uv_req_t.
962 *
963 * Request object for uv_getaddrinfo.
964 */
967 /* read-only */
969 /* struct addrinfo* addrinfo is marked as private, but it really isn't. */
971};
972
973
975 uv_getaddrinfo_t* req,
976 uv_getaddrinfo_cb getaddrinfo_cb,
977 const char* node,
978 const char* service,
979 const struct addrinfo* hints);
980UV_EXTERN void uv_freeaddrinfo(struct addrinfo* ai);
981
982
983/*
984* uv_getnameinfo_t is a subclass of uv_req_t.
985*
986* Request object for uv_getnameinfo.
987*/
990 /* read-only */
992 /* host and service are marked as private, but they really aren't. */
994};
995
997 uv_getnameinfo_t* req,
998 uv_getnameinfo_cb getnameinfo_cb,
999 const struct sockaddr* addr,
1000 int flags);
1001
1002
1003/* uv_spawn() options. */
1004typedef enum {
1009
1010 /*
1011 * When UV_CREATE_PIPE is specified, UV_READABLE_PIPE and UV_WRITABLE_PIPE
1012 * determine the direction of flow, from the child process' perspective. Both
1013 * flags may be specified to create a duplex data stream.
1014 */
1017
1018 /*
1019 * When UV_CREATE_PIPE is specified, specifying UV_NONBLOCK_PIPE opens the
1020 * handle in non-blocking mode in the child. This may cause loss of data,
1021 * if the child is not designed to handle to encounter this mode,
1022 * but can also be significantly more efficient.
1023 */
1025 UV_OVERLAPPED_PIPE = 0x40 /* old name, for compatibility */
1027
1036
1037typedef struct uv_process_options_s {
1038 uv_exit_cb exit_cb; /* Called after the process exits. */
1039 const char* file; /* Path to program to execute. */
1040 /*
1041 * Command line arguments. args[0] should be the path to the program. On
1042 * Windows this uses CreateProcess which concatenates the arguments into a
1043 * string this can cause some strange errors. See the note at
1044 * windows_verbatim_arguments.
1045 */
1046 char** args;
1047 /*
1048 * This will be set as the environ variable in the subprocess. If this is
1049 * NULL then the parents environ will be used.
1050 */
1051 char** env;
1052 /*
1053 * If non-null this represents a directory the subprocess should execute
1054 * in. Stands for current working directory.
1055 */
1056 const char* cwd;
1057 /*
1058 * Various flags that control how uv_spawn() behaves. See the definition of
1059 * `enum uv_process_flags` below.
1060 */
1061 unsigned int flags;
1062 /*
1063 * The `stdio` field points to an array of uv_stdio_container_t structs that
1064 * describe the file descriptors that will be made available to the child
1065 * process. The convention is that stdio[0] points to stdin, fd 1 is used for
1066 * stdout, and fd 2 is stderr.
1067 *
1068 * Note that on windows file descriptors greater than 2 are available to the
1069 * child process only if the child processes uses the MSVCRT runtime.
1070 */
1073 /*
1074 * Libuv can change the child process' user/group id. This happens only when
1075 * the appropriate bits are set in the flags fields. This is not supported on
1076 * windows; uv_spawn() will fail and set the error to UV_ENOTSUP.
1077 */
1081
1082/*
1083 * These are the flags that can be used for the uv_process_options.flags field.
1084 */
1086 /*
1087 * Set the child process' user id. The user id is supplied in the `uid` field
1088 * of the options struct. This does not work on windows; setting this flag
1089 * will cause uv_spawn() to fail.
1090 */
1092 /*
1093 * Set the child process' group id. The user id is supplied in the `gid`
1094 * field of the options struct. This does not work on windows; setting this
1095 * flag will cause uv_spawn() to fail.
1096 */
1098 /*
1099 * Do not wrap any arguments in quotes, or perform any other escaping, when
1100 * converting the argument list into a command line string. This option is
1101 * only meaningful on Windows systems. On Unix it is silently ignored.
1102 */
1104 /*
1105 * Spawn the child process in a detached state - this will make it a process
1106 * group leader, and will effectively enable the child to keep running after
1107 * the parent exits. Note that the child process will still keep the
1108 * parent's event loop alive unless the parent process calls uv_unref() on
1109 * the child's process handle.
1110 */
1112 /*
1113 * Hide the subprocess window that would normally be created. This option is
1114 * only meaningful on Windows systems. On Unix it is silently ignored.
1115 */
1117 /*
1118 * Hide the subprocess console window that would normally be created. This
1119 * option is only meaningful on Windows systems. On Unix it is silently
1120 * ignored.
1121 */
1123 /*
1124 * Hide the subprocess GUI window that would normally be created. This
1125 * option is only meaningful on Windows systems. On Unix it is silently
1126 * ignored.
1127 */
1129 /*
1130 * On Windows, if the path to the program to execute, specified in
1131 * uv_process_options_t's file field, has a directory component,
1132 * search for the exact file name before trying variants with
1133 * extensions like '.exe' or '.cmd'.
1134 */
1137
1138/*
1139 * uv_process_t is a subclass of uv_handle_t.
1140 */
1147
1149 uv_process_t* handle,
1150 const uv_process_options_t* options);
1152UV_EXTERN int uv_kill(int pid, int signum);
1154
1155
1156/*
1157 * uv_work_t is a subclass of uv_req_t.
1158 */
1166
1168 uv_work_t* req,
1169 uv_work_cb work_cb,
1170 uv_after_work_cb after_work_cb);
1171
1173
1174
1176 uint64_t user; /* milliseconds */
1177 uint64_t nice; /* milliseconds */
1178 uint64_t sys; /* milliseconds */
1179 uint64_t idle; /* milliseconds */
1180 uint64_t irq; /* milliseconds */
1181};
1182
1188
1190 char* name;
1191 char phys_addr[6];
1193 union {
1194 struct sockaddr_in address4;
1195 struct sockaddr_in6 address6;
1197 union {
1198 struct sockaddr_in netmask4;
1199 struct sockaddr_in6 netmask6;
1201};
1202
1205 unsigned long uid;
1206 unsigned long gid;
1207 char* shell;
1208 char* homedir;
1209};
1210
1213 unsigned long gid;
1214 char** members;
1215};
1216
1218 char sysname[256];
1219 char release[256];
1220 char version[256];
1221 char machine[256];
1222 /* This struct does not contain the nodename and domainname fields present in
1223 the utsname type. domainname is a GNU extension. Both fields are referred
1224 to as meaningless in the docs. */
1225};
1226
1228 uint64_t f_type;
1229 uint64_t f_bsize;
1230 uint64_t f_blocks;
1231 uint64_t f_bfree;
1232 uint64_t f_bavail;
1233 uint64_t f_files;
1234 uint64_t f_ffree;
1235 uint64_t f_spare[4];
1236};
1237
1248
1250 const char* name;
1252};
1253
1254UV_EXTERN char** uv_setup_args(int argc, char** argv);
1255UV_EXTERN int uv_get_process_title(char* buffer, size_t size);
1256UV_EXTERN int uv_set_process_title(const char* title);
1258UV_EXTERN int uv_uptime(double* uptime);
1261
1262typedef struct {
1263 uv_timeval_t ru_utime; /* user CPU time used */
1264 uv_timeval_t ru_stime; /* system CPU time used */
1265 uint64_t ru_maxrss; /* maximum resident set size */
1266 uint64_t ru_ixrss; /* integral shared memory size */
1267 uint64_t ru_idrss; /* integral unshared data size */
1268 uint64_t ru_isrss; /* integral unshared stack size */
1269 uint64_t ru_minflt; /* page reclaims (soft page faults) */
1270 uint64_t ru_majflt; /* page faults (hard page faults) */
1271 uint64_t ru_nswap; /* swaps */
1272 uint64_t ru_inblock; /* block input operations */
1273 uint64_t ru_oublock; /* block output operations */
1274 uint64_t ru_msgsnd; /* IPC messages sent */
1275 uint64_t ru_msgrcv; /* IPC messages received */
1276 uint64_t ru_nsignals; /* signals received */
1277 uint64_t ru_nvcsw; /* voluntary context switches */
1278 uint64_t ru_nivcsw; /* involuntary context switches */
1279} uv_rusage_t;
1280
1282
1283UV_EXTERN int uv_os_homedir(char* buffer, size_t* size);
1284UV_EXTERN int uv_os_tmpdir(char* buffer, size_t* size);
1292
1293#if defined(__PASE__)
1294/* On IBM i PASE, the highest process priority is -10 */
1295# define UV_PRIORITY_LOW 39 /* RUNPTY(99) */
1296# define UV_PRIORITY_BELOW_NORMAL 15 /* RUNPTY(50) */
1297# define UV_PRIORITY_NORMAL 0 /* RUNPTY(20) */
1298# define UV_PRIORITY_ABOVE_NORMAL -4 /* RUNTY(12) */
1299# define UV_PRIORITY_HIGH -7 /* RUNPTY(6) */
1300# define UV_PRIORITY_HIGHEST -10 /* RUNPTY(1) */
1301#else
1302# define UV_PRIORITY_LOW 19
1303# define UV_PRIORITY_BELOW_NORMAL 10
1304# define UV_PRIORITY_NORMAL 0
1305# define UV_PRIORITY_ABOVE_NORMAL -7
1306# define UV_PRIORITY_HIGH -14
1307# define UV_PRIORITY_HIGHEST -20
1308#endif
1309
1310UV_EXTERN int uv_os_getpriority(uv_pid_t pid, int* priority);
1311UV_EXTERN int uv_os_setpriority(uv_pid_t pid, int priority);
1312
1313enum {
1319};
1320
1323
1325UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count);
1326UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count);
1328
1330 int* count);
1332 int count);
1333
1335 char* name;
1336 char* value;
1337};
1338
1339UV_EXTERN int uv_os_environ(uv_env_item_t** envitems, int* count);
1340UV_EXTERN void uv_os_free_environ(uv_env_item_t* envitems, int count);
1341UV_EXTERN int uv_os_getenv(const char* name, char* buffer, size_t* size);
1342UV_EXTERN int uv_os_setenv(const char* name, const char* value);
1343UV_EXTERN int uv_os_unsetenv(const char* name);
1344
1345#ifdef MAXHOSTNAMELEN
1346# define UV_MAXHOSTNAMESIZE (MAXHOSTNAMELEN + 1)
1347#else
1348 /*
1349 Fallback for the maximum hostname size, including the null terminator. The
1350 Windows gethostname() documentation states that 256 bytes will always be
1351 large enough to hold the null-terminated hostname.
1352 */
1353# define UV_MAXHOSTNAMESIZE 256
1354#endif
1355
1356UV_EXTERN int uv_os_gethostname(char* buffer, size_t* size);
1357
1359
1361 uint64_t loop_count;
1362 uint64_t events;
1364 /* private */
1365 uint64_t* reserved[13];
1366};
1367
1370
1411
1418
1419/* uv_fs_t is a subclass of uv_req_t. */
1420struct uv_fs_s {
1426 void* ptr;
1427 const char* path;
1428 uv_stat_t statbuf; /* Stores the result of uv_fs_stat() and uv_fs_fstat(). */
1430};
1431
1438
1441 uv_fs_t* req,
1442 uv_file file,
1443 uv_fs_cb cb);
1445 uv_fs_t* req,
1446 const char* path,
1447 int flags,
1448 int mode,
1449 uv_fs_cb cb);
1451 uv_fs_t* req,
1452 uv_file file,
1453 const uv_buf_t bufs[],
1454 unsigned int nbufs,
1455 int64_t offset,
1456 uv_fs_cb cb);
1458 uv_fs_t* req,
1459 const char* path,
1460 uv_fs_cb cb);
1462 uv_fs_t* req,
1463 uv_file file,
1464 const uv_buf_t bufs[],
1465 unsigned int nbufs,
1466 int64_t offset,
1467 uv_fs_cb cb);
1468/*
1469 * This flag can be used with uv_fs_copyfile() to return an error if the
1470 * destination already exists.
1471 */
1472#define UV_FS_COPYFILE_EXCL 0x0001
1473
1474/*
1475 * This flag can be used with uv_fs_copyfile() to attempt to create a reflink.
1476 * If copy-on-write is not supported, a fallback copy mechanism is used.
1477 */
1478#define UV_FS_COPYFILE_FICLONE 0x0002
1479
1480/*
1481 * This flag can be used with uv_fs_copyfile() to attempt to create a reflink.
1482 * If copy-on-write is not supported, an error is returned.
1483 */
1484#define UV_FS_COPYFILE_FICLONE_FORCE 0x0004
1485
1487 uv_fs_t* req,
1488 const char* path,
1489 const char* new_path,
1490 int flags,
1491 uv_fs_cb cb);
1493 uv_fs_t* req,
1494 const char* path,
1495 int mode,
1496 uv_fs_cb cb);
1498 uv_fs_t* req,
1499 const char* tpl,
1500 uv_fs_cb cb);
1502 uv_fs_t* req,
1503 const char* tpl,
1504 uv_fs_cb cb);
1506 uv_fs_t* req,
1507 const char* path,
1508 uv_fs_cb cb);
1510 uv_fs_t* req,
1511 const char* path,
1512 int flags,
1513 uv_fs_cb cb);
1515 uv_dirent_t* ent);
1517 uv_fs_t* req,
1518 const char* path,
1519 uv_fs_cb cb);
1521 uv_fs_t* req,
1522 uv_dir_t* dir,
1523 uv_fs_cb cb);
1525 uv_fs_t* req,
1526 uv_dir_t* dir,
1527 uv_fs_cb cb);
1529 uv_fs_t* req,
1530 const char* path,
1531 uv_fs_cb cb);
1533 uv_fs_t* req,
1534 uv_file file,
1535 uv_fs_cb cb);
1537 uv_fs_t* req,
1538 const char* path,
1539 const char* new_path,
1540 uv_fs_cb cb);
1542 uv_fs_t* req,
1543 uv_file file,
1544 uv_fs_cb cb);
1546 uv_fs_t* req,
1547 uv_file file,
1548 uv_fs_cb cb);
1550 uv_fs_t* req,
1551 uv_file file,
1552 int64_t offset,
1553 uv_fs_cb cb);
1555 uv_fs_t* req,
1556 uv_file out_fd,
1557 uv_file in_fd,
1558 int64_t in_offset,
1559 size_t length,
1560 uv_fs_cb cb);
1562 uv_fs_t* req,
1563 const char* path,
1564 int mode,
1565 uv_fs_cb cb);
1567 uv_fs_t* req,
1568 const char* path,
1569 int mode,
1570 uv_fs_cb cb);
1572 uv_fs_t* req,
1573 const char* path,
1574 double atime,
1575 double mtime,
1576 uv_fs_cb cb);
1578 uv_fs_t* req,
1579 uv_file file,
1580 double atime,
1581 double mtime,
1582 uv_fs_cb cb);
1584 uv_fs_t* req,
1585 const char* path,
1586 double atime,
1587 double mtime,
1588 uv_fs_cb cb);
1590 uv_fs_t* req,
1591 const char* path,
1592 uv_fs_cb cb);
1594 uv_fs_t* req,
1595 const char* path,
1596 const char* new_path,
1597 uv_fs_cb cb);
1598
1599/*
1600 * This flag can be used with uv_fs_symlink() on Windows to specify whether
1601 * path argument points to a directory.
1602 */
1603#define UV_FS_SYMLINK_DIR 0x0001
1604
1605/*
1606 * This flag can be used with uv_fs_symlink() on Windows to specify whether
1607 * the symlink is to be created using junction points.
1608 */
1609#define UV_FS_SYMLINK_JUNCTION 0x0002
1610
1612 uv_fs_t* req,
1613 const char* path,
1614 const char* new_path,
1615 int flags,
1616 uv_fs_cb cb);
1618 uv_fs_t* req,
1619 const char* path,
1620 uv_fs_cb cb);
1622 uv_fs_t* req,
1623 const char* path,
1624 uv_fs_cb cb);
1626 uv_fs_t* req,
1627 uv_file file,
1628 int mode,
1629 uv_fs_cb cb);
1631 uv_fs_t* req,
1632 const char* path,
1633 uv_uid_t uid,
1634 uv_gid_t gid,
1635 uv_fs_cb cb);
1637 uv_fs_t* req,
1638 uv_file file,
1639 uv_uid_t uid,
1640 uv_gid_t gid,
1641 uv_fs_cb cb);
1643 uv_fs_t* req,
1644 const char* path,
1645 uv_uid_t uid,
1646 uv_gid_t gid,
1647 uv_fs_cb cb);
1649 uv_fs_t* req,
1650 const char* path,
1651 uv_fs_cb cb);
1652
1653
1658
1659
1662 /* private */
1663 char* path;
1665};
1666
1667
1668/*
1669 * uv_fs_stat() based polling file watcher.
1670 */
1673 /* Private, don't touch. */
1675};
1676
1679 uv_fs_poll_cb poll_cb,
1680 const char* path,
1681 unsigned int interval);
1684 char* buffer,
1685 size_t* size);
1686
1687
1694
1697 uv_signal_cb signal_cb,
1698 int signum);
1700 uv_signal_cb signal_cb,
1701 int signum);
1703
1704UV_EXTERN void uv_loadavg(double avg[3]);
1705
1706
1707/*
1708 * Flags to be passed to uv_fs_event_start().
1709 */
1711 /*
1712 * By default, if the fs event watcher is given a directory name, we will
1713 * watch for all events in that directory. This flags overrides this behavior
1714 * and makes fs_event report only changes to the directory entry itself. This
1715 * flag does not affect individual files watched.
1716 * This flag is currently not implemented yet on any backend.
1717 */
1719
1720 /*
1721 * By default uv_fs_event will try to use a kernel interface such as inotify
1722 * or kqueue to detect events. This may not work on remote filesystems such
1723 * as NFS mounts. This flag makes fs_event fall back to calling stat() on a
1724 * regular interval.
1725 * This flag is currently not implemented yet on any backend.
1726 */
1728
1729 /*
1730 * By default, event watcher, when watching directory, is not registering
1731 * (is ignoring) changes in it's subdirectories.
1732 * This flag will override this behaviour on platforms that support it.
1733 */
1736
1737
1740 uv_fs_event_cb cb,
1741 const char* path,
1742 unsigned int flags);
1745 char* buffer,
1746 size_t* size);
1747
1748UV_EXTERN int uv_ip4_addr(const char* ip, int port, struct sockaddr_in* addr);
1749UV_EXTERN int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr);
1750
1751UV_EXTERN int uv_ip4_name(const struct sockaddr_in* src, char* dst, size_t size);
1752UV_EXTERN int uv_ip6_name(const struct sockaddr_in6* src, char* dst, size_t size);
1753UV_EXTERN int uv_ip_name(const struct sockaddr* src, char* dst, size_t size);
1754
1755UV_EXTERN int uv_inet_ntop(int af, const void* src, char* dst, size_t size);
1756UV_EXTERN int uv_inet_pton(int af, const char* src, void* dst);
1757
1758
1761 /* read-only */
1763 /* private */
1765 void* buf;
1766 size_t buflen;
1769};
1770
1772 uv_random_t* req,
1773 void *buf,
1774 size_t buflen,
1775 unsigned flags, /* For future extension; must be 0. */
1776 uv_random_cb cb);
1777
1778#if defined(IF_NAMESIZE)
1779# define UV_IF_NAMESIZE (IF_NAMESIZE + 1)
1780#elif defined(IFNAMSIZ)
1781# define UV_IF_NAMESIZE (IFNAMSIZ + 1)
1782#else
1783# define UV_IF_NAMESIZE (16 + 1)
1784#endif
1785
1786UV_EXTERN int uv_if_indextoname(unsigned int ifindex,
1787 char* buffer,
1788 size_t* size);
1789UV_EXTERN int uv_if_indextoiid(unsigned int ifindex,
1790 char* buffer,
1791 size_t* size);
1792
1793UV_EXTERN int uv_exepath(char* buffer, size_t* size);
1794
1795UV_EXTERN int uv_cwd(char* buffer, size_t* size);
1796
1797UV_EXTERN int uv_chdir(const char* dir);
1798
1803
1805UV_EXTERN uint64_t uv_hrtime(void);
1806UV_EXTERN void uv_sleep(unsigned int msec);
1807
1809
1810UV_EXTERN int uv_dlopen(const char* filename, uv_lib_t* lib);
1812UV_EXTERN int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr);
1813UV_EXTERN const char* uv_dlerror(const uv_lib_t* lib);
1814
1821
1830
1831UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value);
1836
1841
1842UV_EXTERN int uv_barrier_init(uv_barrier_t* barrier, unsigned int count);
1845
1848 uv_mutex_t* mutex,
1849 uint64_t timeout);
1850
1851UV_EXTERN void uv_once(uv_once_t* guard, void (*callback)(void));
1852
1856UV_EXTERN void uv_key_set(uv_key_t* key, void* value);
1857
1859
1860typedef void (*uv_thread_cb)(void* arg);
1861
1863
1868
1870 unsigned int flags;
1872 /* More fields may be added at any time. */
1873};
1874
1876
1878 const uv_thread_options_t* params,
1879 uv_thread_cb entry,
1880 void* arg);
1882 char* cpumask,
1883 char* oldmask,
1884 size_t mask_size);
1886 char* cpumask,
1887 size_t mask_size);
1892
1893/* The presence of these unions force similar struct layout. */
1894#define XX(_, name) uv_ ## name ## _t name;
1898
1901};
1902#undef XX
1903
1904
1906 /* User data - use this for whatever. */
1907 void* data;
1908 /* Loop reference counting. */
1909 unsigned int active_handles;
1911 union {
1912 void* unused;
1913 unsigned int count;
1915 /* Internal storage for future extensions. */
1917 /* Internal flag to signal loop stop. */
1918 unsigned int stop_flag;
1920};
1921
1924
1925/* Unicode utilities needed for dealing with Windows. */
1926UV_EXTERN size_t uv_utf16_length_as_wtf8(const uint16_t* utf16,
1927 ssize_t utf16_len);
1928UV_EXTERN int uv_utf16_to_wtf8(const uint16_t* utf16,
1929 ssize_t utf16_len,
1930 char** wtf8_ptr,
1931 size_t* wtf8_len_ptr);
1933UV_EXTERN void uv_wtf8_to_utf16(const char* wtf8,
1934 uint16_t* utf16,
1935 size_t utf16_len);
1936
1937/* Don't export the private CPP symbols. */
1938#undef UV_HANDLE_TYPE_PRIVATE
1939#undef UV_REQ_TYPE_PRIVATE
1940#undef UV_REQ_PRIVATE_FIELDS
1941#undef UV_STREAM_PRIVATE_FIELDS
1942#undef UV_TCP_PRIVATE_FIELDS
1943#undef UV_PREPARE_PRIVATE_FIELDS
1944#undef UV_CHECK_PRIVATE_FIELDS
1945#undef UV_IDLE_PRIVATE_FIELDS
1946#undef UV_ASYNC_PRIVATE_FIELDS
1947#undef UV_TIMER_PRIVATE_FIELDS
1948#undef UV_GETADDRINFO_PRIVATE_FIELDS
1949#undef UV_GETNAMEINFO_PRIVATE_FIELDS
1950#undef UV_FS_REQ_PRIVATE_FIELDS
1951#undef UV_WORK_PRIVATE_FIELDS
1952#undef UV_FS_EVENT_PRIVATE_FIELDS
1953#undef UV_SIGNAL_PRIVATE_FIELDS
1954#undef UV_LOOP_PRIVATE_FIELDS
1955#undef UV_LOOP_PRIVATE_PLATFORM_FIELDS
1956#undef UV__ERR
1957
1958#endif /* UV_H */
auto ptr(T p) -> const void *
Converts p to const void* for pointer formatting.
Definition format.h:3821
Definition uv.h:60
struct uv__queue * next
Definition uv.h:61
struct uv__queue * prev
Definition uv.h:62
Definition threadpool.h:30
struct uv_loop_s * loop
Definition threadpool.h:33
Definition uv.h:927
Definition win.h:281
It should be possible to cast uv_buf_t[] to WSABUF[] see http://msdn.microsoft.com/en-us/library/ms74...
Definition win.h:238
Definition uv.h:907
Definition uv.h:636
uv_stream_t * handle
Definition uv.h:639
UV_REQ_FIELDS uv_connect_cb cb
Definition uv.h:638
Definition uv.h:1183
struct uv_cpu_times_s cpu_times
Definition uv.h:1186
char * model
Definition uv.h:1184
int speed
Definition uv.h:1185
Definition uv.h:1175
uint64_t nice
Definition uv.h:1177
uint64_t sys
Definition uv.h:1178
uint64_t idle
Definition uv.h:1179
uint64_t user
Definition uv.h:1176
uint64_t irq
Definition uv.h:1180
Definition uv.h:1412
uv_dirent_t * dirents
Definition uv.h:1413
void * reserved[4]
Definition uv.h:1415
size_t nentries
Definition uv.h:1414
Definition uv.h:1249
uv_dirent_type_t type
Definition uv.h:1251
const char * name
Definition uv.h:1250
Definition uv.h:1334
char * value
Definition uv.h:1336
char * name
Definition uv.h:1335
Definition uv.h:1660
UV_HANDLE_FIELDS char * path
Definition uv.h:1663
Definition uv.h:1671
UV_HANDLE_FIELDS void * poll_ctx
Definition uv.h:1674
Definition uv.h:1420
uv_stat_t statbuf
Definition uv.h:1428
const char * path
Definition uv.h:1427
void * ptr
Definition uv.h:1426
ssize_t result
Definition uv.h:1425
UV_REQ_FIELDS uv_fs_type fs_type
Definition uv.h:1422
uv_loop_t * loop
Definition uv.h:1423
uv_fs_cb cb
Definition uv.h:1424
Definition uv.h:965
UV_REQ_FIELDS uv_loop_t * loop
Definition uv.h:968
Definition uv.h:988
UV_REQ_FIELDS uv_loop_t * loop
Definition uv.h:991
Definition uv.h:1211
unsigned long gid
Definition uv.h:1213
char * groupname
Definition uv.h:1212
char ** members
Definition uv.h:1214
Definition uv.h:476
Definition uv.h:917
Definition uv.h:1189
int is_internal
Definition uv.h:1192
struct sockaddr_in6 address6
Definition uv.h:1195
struct sockaddr_in address4
Definition uv.h:1194
union uv_interface_address_s::@18 netmask
char * name
Definition uv.h:1190
union uv_interface_address_s::@17 address
char phys_addr[6]
Definition uv.h:1191
Definition win.h:290
Definition win.h:326
Definition uv.h:1905
unsigned int stop_flag
Definition uv.h:1918
void * internal_fields
Definition uv.h:1916
void * data
Definition uv.h:1907
unsigned int count
Definition uv.h:1913
union uv_loop_s::@19 active_reqs
unsigned int active_handles
Definition uv.h:1909
struct uv__queue handle_queue
Definition uv.h:1910
void * unused
Definition uv.h:1912
Definition uv.h:1360
uint64_t events
Definition uv.h:1362
uint64_t events_waiting
Definition uv.h:1363
uint64_t * reserved[13]
Definition uv.h:1365
uint64_t loop_count
Definition uv.h:1361
Definition win.h:296
Definition uv.h:1203
char * username
Definition uv.h:1204
char * homedir
Definition uv.h:1208
unsigned long uid
Definition uv.h:1205
unsigned long gid
Definition uv.h:1206
char * shell
Definition uv.h:1207
Definition uv.h:840
UV_HANDLE_FIELDS UV_STREAM_FIELDS int ipc
Definition uv.h:843
Definition uv.h:876
UV_HANDLE_FIELDS uv_poll_cb poll_cb
Definition uv.h:878
Definition uv.h:897
Definition uv.h:1037
uv_uid_t uid
Definition uv.h:1078
const char * file
Definition uv.h:1039
char ** env
Definition uv.h:1051
uv_stdio_container_t * stdio
Definition uv.h:1072
unsigned int flags
Definition uv.h:1061
char ** args
Definition uv.h:1046
int stdio_count
Definition uv.h:1071
uv_exit_cb exit_cb
Definition uv.h:1038
uv_gid_t gid
Definition uv.h:1079
const char * cwd
Definition uv.h:1056
Definition uv.h:1141
int pid
Definition uv.h:1144
UV_HANDLE_FIELDS uv_exit_cb exit_cb
Definition uv.h:1143
Definition uv.h:1759
void * buf
Definition uv.h:1765
struct uv__work work_req
Definition uv.h:1768
size_t buflen
Definition uv.h:1766
UV_REQ_FIELDS uv_loop_t * loop
Definition uv.h:1762
int status
Definition uv.h:1764
uv_random_cb cb
Definition uv.h:1767
Definition uv.h:439
Definition uv.h:1262
uint64_t ru_msgrcv
Definition uv.h:1275
uv_timeval_t ru_utime
Definition uv.h:1263
uint64_t ru_nsignals
Definition uv.h:1276
uint64_t ru_ixrss
Definition uv.h:1266
uint64_t ru_idrss
Definition uv.h:1267
uv_timeval_t ru_stime
Definition uv.h:1264
uint64_t ru_isrss
Definition uv.h:1268
uint64_t ru_minflt
Definition uv.h:1269
uint64_t ru_majflt
Definition uv.h:1270
uint64_t ru_nivcsw
Definition uv.h:1278
uint64_t ru_oublock
Definition uv.h:1273
uint64_t ru_nswap
Definition uv.h:1271
uint64_t ru_maxrss
Definition uv.h:1265
uint64_t ru_inblock
Definition uv.h:1272
uint64_t ru_msgsnd
Definition uv.h:1274
uint64_t ru_nvcsw
Definition uv.h:1277
Definition win.h:271
Definition uv.h:452
UV_REQ_FIELDS uv_stream_t * handle
Definition uv.h:454
uv_shutdown_cb cb
Definition uv.h:455
Definition uv.h:1688
int signum
Definition uv.h:1691
UV_HANDLE_FIELDS uv_signal_cb signal_cb
Definition uv.h:1690
Definition uv.h:381
uint64_t st_nlink
Definition uv.h:384
uint64_t st_ino
Definition uv.h:388
uint64_t st_flags
Definition uv.h:392
uint64_t st_mode
Definition uv.h:383
uv_timespec_t st_birthtim
Definition uv.h:397
uint64_t st_size
Definition uv.h:389
uv_timespec_t st_ctim
Definition uv.h:396
uint64_t st_blocks
Definition uv.h:391
uv_timespec_t st_mtim
Definition uv.h:395
uv_timespec_t st_atim
Definition uv.h:394
uint64_t st_gid
Definition uv.h:386
uint64_t st_gen
Definition uv.h:393
uint64_t st_dev
Definition uv.h:382
uint64_t st_uid
Definition uv.h:385
uint64_t st_rdev
Definition uv.h:387
uint64_t st_blksize
Definition uv.h:390
Definition uv.h:1227
uint64_t f_files
Definition uv.h:1233
uint64_t f_type
Definition uv.h:1228
uint64_t f_bsize
Definition uv.h:1229
uint64_t f_bfree
Definition uv.h:1231
uint64_t f_ffree
Definition uv.h:1234
uint64_t f_bavail
Definition uv.h:1232
uint64_t f_spare[4]
Definition uv.h:1235
uint64_t f_blocks
Definition uv.h:1230
Definition uv.h:1028
uv_stream_t * stream
Definition uv.h:1032
int fd
Definition uv.h:1033
union uv_stdio_container_s::@16 data
uv_stdio_flags flags
Definition uv.h:1029
Definition uv.h:532
Definition uv.h:589
Definition uv.h:1869
unsigned int flags
Definition uv.h:1870
size_t stack_size
Definition uv.h:1871
Definition uv.h:943
Definition uv.h:365
int32_t tv_nsec
Definition uv.h:367
int64_t tv_sec
Definition uv.h:366
Definition uv.h:360
long tv_sec
Definition uv.h:361
long tv_nsec
Definition uv.h:362
Definition uv.h:376
int64_t tv_sec
Definition uv.h:377
int32_t tv_usec
Definition uv.h:378
Definition uv.h:371
long tv_usec
Definition uv.h:373
long tv_sec
Definition uv.h:372
Definition uv.h:789
Definition uv.h:713
size_t send_queue_count
Definition uv.h:724
UV_HANDLE_FIELDS size_t send_queue_size
Definition uv.h:720
Definition uv.h:729
UV_REQ_FIELDS uv_udp_t * handle
Definition uv.h:731
uv_udp_send_cb cb
Definition uv.h:732
Definition uv.h:1217
char version[256]
Definition uv.h:1220
char machine[256]
Definition uv.h:1221
char release[256]
Definition uv.h:1219
char sysname[256]
Definition uv.h:1218
Definition uv.h:1159
uv_after_work_cb after_work_cb
Definition uv.h:1163
uv_work_cb work_cb
Definition uv.h:1162
UV_REQ_FIELDS uv_loop_t * loop
Definition uv.h:1161
Definition uv.h:567
uv_stream_t * send_handle
Definition uv.h:570
uv_stream_t * handle
Definition uv.h:571
UV_REQ_FIELDS uv_write_cb cb
Definition uv.h:569
Definition uv.h:1895
Definition uv.h:1899
Definition win.h:261
UV_EXTERN void uv_print_active_handles(uv_loop_t *loop, FILE *stream)
UV_EXTERN int uv_set_process_title(const char *title)
void(* uv_random_cb)(uv_random_t *req, int status, void *buf, size_t buflen)
Definition uv.h:349
uv_thread_create_flags
Definition uv.h:1864
@ UV_THREAD_HAS_STACK_SIZE
Definition uv.h:1866
@ UV_THREAD_NO_FLAGS
Definition uv.h:1865
UV_EXTERN void uv_key_delete(uv_key_t *key)
UV_EXTERN void uv_stop(uv_loop_t *)
UV_EXTERN uv_loop_t * uv_handle_get_loop(const uv_handle_t *handle)
UV_EXTERN int uv_exepath(char *buffer, size_t *size)
UV_EXTERN int uv_thread_getpriority(uv_thread_t tid, int *priority)
UV_EXTERN int uv_poll_init(uv_loop_t *loop, uv_poll_t *handle, int fd)
UV_EXTERN int uv_fs_fstat(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
UV_EXTERN ssize_t uv_wtf8_length_as_utf16(const char *wtf8)
UV_EXTERN void uv_mutex_lock(uv_mutex_t *handle)
UV_EXTERN int uv_gettimeofday(uv_timeval64_t *tv)
UV_EXTERN int uv_fs_open(uv_loop_t *loop, uv_fs_t *req, const char *path, int flags, int mode, uv_fs_cb cb)
UV_EXTERN int uv_cpu_info(uv_cpu_info_t **cpu_infos, int *count)
UV_EXTERN int uv_tcp_init_ex(uv_loop_t *, uv_tcp_t *handle, unsigned int flags)
uv_stdio_flags
Definition uv.h:1004
@ UV_INHERIT_FD
Definition uv.h:1007
@ UV_CREATE_PIPE
Definition uv.h:1006
@ UV_WRITABLE_PIPE
Definition uv.h:1016
@ UV_IGNORE
Definition uv.h:1005
@ UV_OVERLAPPED_PIPE
Definition uv.h:1025
@ UV_INHERIT_STREAM
Definition uv.h:1008
@ UV_READABLE_PIPE
Definition uv.h:1015
@ UV_NONBLOCK_PIPE
Definition uv.h:1024
UV_EXTERN void uv_free_interface_addresses(uv_interface_address_t *addresses, int count)
UV_EXTERN int uv_ip4_addr(const char *ip, int port, struct sockaddr_in *addr)
#define UV_HANDLE_FIELDS
Definition uv.h:460
UV_EXTERN int uv_udp_bind(uv_udp_t *handle, const struct sockaddr *addr, unsigned int flags)
UV_EXTERN int uv_is_active(const uv_handle_t *handle)
UV_EXTERN uv_pid_t uv_process_get_pid(const uv_process_t *)
UV_EXTERN int uv_udp_recv_start(uv_udp_t *handle, uv_alloc_cb alloc_cb, uv_udp_recv_cb recv_cb)
UV_EXTERN int uv_getrusage(uv_rusage_t *rusage)
uv_run_mode
Definition uv.h:265
@ UV_RUN_NOWAIT
Definition uv.h:268
@ UV_RUN_ONCE
Definition uv.h:267
@ UV_RUN_DEFAULT
Definition uv.h:266
void(* uv_write_cb)(uv_write_t *req, int status)
Definition uv.h:326
uv_process_flags
Definition uv.h:1085
@ UV_PROCESS_WINDOWS_HIDE_CONSOLE
Definition uv.h:1122
@ UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS
Definition uv.h:1103
@ UV_PROCESS_WINDOWS_HIDE
Definition uv.h:1116
@ UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME
Definition uv.h:1135
@ UV_PROCESS_SETUID
Definition uv.h:1091
@ UV_PROCESS_SETGID
Definition uv.h:1097
@ UV_PROCESS_DETACHED
Definition uv.h:1111
@ UV_PROCESS_WINDOWS_HIDE_GUI
Definition uv.h:1128
void(* uv_connection_cb)(uv_stream_t *server, int status)
Definition uv.h:329
UV_EXTERN int uv_barrier_init(uv_barrier_t *barrier, unsigned int count)
UV_EXTERN void uv_walk(uv_loop_t *loop, uv_walk_cb walk_cb, void *arg)
UV_EXTERN int uv_translate_sys_error(int sys_errno)
UV_EXTERN void uv_print_all_handles(uv_loop_t *loop, FILE *stream)
UV_EXTERN void * uv_req_get_data(const uv_req_t *req)
UV_EXTERN int uv_check_start(uv_check_t *check, uv_check_cb cb)
UV_EXTERN int uv_interface_addresses(uv_interface_address_t **addresses, int *count)
UV_EXTERN int uv_tcp_keepalive(uv_tcp_t *handle, int enable, unsigned int delay)
UV_EXTERN int uv_rwlock_init(uv_rwlock_t *rwlock)
@ UV_PIPE_NO_TRUNCATE
Definition uv.h:831
UV_EXTERN int uv_prepare_init(uv_loop_t *, uv_prepare_t *prepare)
UV_EXTERN int uv_recv_buffer_size(uv_handle_t *handle, int *value)
UV_EXTERN int uv_fs_ftruncate(uv_loop_t *loop, uv_fs_t *req, uv_file file, int64_t offset, uv_fs_cb cb)
UV_EXTERN int uv_fs_poll_getpath(uv_fs_poll_t *handle, char *buffer, size_t *size)
UV_EXTERN int uv_fs_read(uv_loop_t *loop, uv_fs_t *req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb)
UV_EXTERN int uv_backend_timeout(const uv_loop_t *)
UV_EXTERN int uv_thread_join(uv_thread_t *tid)
UV_EXTERN int uv_timer_start(uv_timer_t *handle, uv_timer_cb cb, uint64_t timeout, uint64_t repeat)
UV_EXTERN int uv_timer_init(uv_loop_t *, uv_timer_t *handle)
void(* uv_getaddrinfo_cb)(uv_getaddrinfo_t *req, int status, struct addrinfo *res)
Definition uv.h:342
void *(* uv_malloc_func)(size_t size)
Definition uv.h:275
UV_EXTERN int uv_tcp_open(uv_tcp_t *handle, uv_os_sock_t sock)
UV_EXTERN int uv_process_kill(uv_process_t *, int signum)
UV_EXTERN void uv_rwlock_wrlock(uv_rwlock_t *rwlock)
UV_EXTERN int uv_poll_start(uv_poll_t *handle, int events, uv_poll_cb cb)
UV_EXTERN void uv_wtf8_to_utf16(const char *wtf8, uint16_t *utf16, size_t utf16_len)
UV_EXTERN int uv_kill(int pid, int signum)
UV_EXTERN int uv_ip6_addr(const char *ip, int port, struct sockaddr_in6 *addr)
UV_EXTERN const char * uv_handle_type_name(uv_handle_type type)
UV_EXTERN int uv_fs_fsync(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
uv_tty_mode_t
Definition uv.h:795
@ UV_TTY_MODE_IO
Definition uv.h:801
@ UV_TTY_MODE_NORMAL
Definition uv.h:797
@ UV_TTY_MODE_RAW
Definition uv.h:799
void(* uv_fs_event_cb)(uv_fs_event_t *handle, const char *filename, int events, int status)
Definition uv.h:401
UV_EXTERN int uv_try_write2(uv_stream_t *handle, const uv_buf_t bufs[], unsigned int nbufs, uv_stream_t *send_handle)
UV_EXTERN int uv_signal_start_oneshot(uv_signal_t *handle, uv_signal_cb signal_cb, int signum)
UV_EXTERN int uv_os_setpriority(uv_pid_t pid, int priority)
UV_EXTERN void uv_fs_req_cleanup(uv_fs_t *req)
UV_EXTERN int uv_if_indextoiid(unsigned int ifindex, char *buffer, size_t *size)
UV_EXTERN void uv_once(uv_once_t *guard, void(*callback)(void))
UV_EXTERN int uv_resident_set_memory(size_t *rss)
void(* uv_fs_poll_cb)(uv_fs_poll_t *handle, int status, const uv_stat_t *prev, const uv_stat_t *curr)
Definition uv.h:406
UV_EXTERN int uv_spawn(uv_loop_t *loop, uv_process_t *handle, const uv_process_options_t *options)
UV_EXTERN int uv_idle_stop(uv_idle_t *idle)
UV_EXTERN int uv_udp_set_ttl(uv_udp_t *handle, int ttl)
uv_handle_type
Definition uv.h:195
@ UV_FILE
Definition uv.h:200
@ UV_HANDLE_TYPE_MAX
Definition uv.h:201
@ UV_UNKNOWN_HANDLE
Definition uv.h:196
UV_EXTERN uint64_t uv_get_free_memory(void)
UV_EXTERN int uv_if_indextoname(unsigned int ifindex, char *buffer, size_t *size)
void(* uv_free_func)(void *ptr)
Definition uv.h:278
UV_EXTERN void uv_sleep(unsigned int msec)
UV_EXTERN int uv_tcp_connect(uv_connect_t *req, uv_tcp_t *handle, const struct sockaddr *addr, uv_connect_cb cb)
uv_udp_flags
Definition uv.h:648
@ UV_UDP_LINUX_RECVERR
Definition uv.h:686
@ UV_UDP_REUSEPORT
Definition uv.h:698
@ UV_UDP_PARTIAL
Definition uv.h:655
@ UV_UDP_MMSG_FREE
Definition uv.h:678
@ UV_UDP_MMSG_CHUNK
Definition uv.h:672
@ UV_UDP_IPV6ONLY
Definition uv.h:650
@ UV_UDP_RECVMMSG
Definition uv.h:702
@ UV_UDP_REUSEADDR
Definition uv.h:667
UV_EXTERN void uv_sem_destroy(uv_sem_t *sem)
UV_EXTERN int uv_backend_fd(const uv_loop_t *)
UV_EXTERN int uv_udp_set_multicast_interface(uv_udp_t *handle, const char *interface_addr)
UV_EXTERN int uv_os_get_passwd(uv_passwd_t *pwd)
UV_EXTERN int uv_fs_stat(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
UV_EXTERN int uv_udp_init_ex(uv_loop_t *, uv_udp_t *handle, unsigned int flags)
UV_EXTERN int uv_random(uv_loop_t *loop, uv_random_t *req, void *buf, size_t buflen, unsigned flags, uv_random_cb cb)
UV_EXTERN int uv_write(uv_write_t *req, uv_stream_t *handle, const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb)
UV_EXTERN int uv_thread_getaffinity(uv_thread_t *tid, char *cpumask, size_t mask_size)
UV_EXTERN int uv_signal_start(uv_signal_t *handle, uv_signal_cb signal_cb, int signum)
UV_EXTERN void uv_ref(uv_handle_t *)
uv_tcp_flags
Definition uv.h:604
@ UV_TCP_IPV6ONLY
Definition uv.h:606
@ UV_TCP_REUSEPORT
Definition uv.h:617
UV_EXTERN uv_buf_t uv_buf_init(char *base, unsigned int len)
UV_EXTERN int uv_check_init(uv_loop_t *, uv_check_t *check)
UV_EXTERN int uv_read_stop(uv_stream_t *)
UV_EXTERN int uv_os_environ(uv_env_item_t **envitems, int *count)
UV_EXTERN size_t uv_handle_size(uv_handle_type type)
UV_EXTERN size_t uv_req_size(uv_req_type type)
UV_EXTERN const char * uv_version_string(void)
UV_EXTERN int uv_mutex_init_recursive(uv_mutex_t *handle)
UV_EXTERN uint64_t uv_hrtime(void)
UV_EXTERN void uv_loop_set_data(uv_loop_t *, void *data)
UV_EXTERN int uv_fs_access(uv_loop_t *loop, uv_fs_t *req, const char *path, int mode, uv_fs_cb cb)
UV_EXTERN int uv_thread_getcpu(void)
UV_EXTERN int uv_stream_set_blocking(uv_stream_t *handle, int blocking)
UV_EXTERN int uv_dlopen(const char *filename, uv_lib_t *lib)
UV_EXTERN void * uv_key_get(uv_key_t *key)
UV_EXTERN int uv_os_getpriority(uv_pid_t pid, int *priority)
void(* uv_prepare_cb)(uv_prepare_t *handle)
Definition uv.h:334
UV_EXTERN int uv_read_start(uv_stream_t *, uv_alloc_cb alloc_cb, uv_read_cb read_cb)
void(* uv_after_work_cb)(uv_work_t *req, int status)
Definition uv.h:341
UV_EXTERN int uv_tcp_close_reset(uv_tcp_t *handle, uv_close_cb close_cb)
UV_EXTERN void uv_os_free_group(uv_group_t *grp)
UV_EXTERN void uv_sem_post(uv_sem_t *sem)
UV_EXTERN int uv_udp_send(uv_udp_send_t *req, uv_udp_t *handle, const uv_buf_t bufs[], unsigned int nbufs, const struct sockaddr *addr, uv_udp_send_cb send_cb)
UV_EXTERN int uv_ip_name(const struct sockaddr *src, char *dst, size_t size)
UV_EXTERN int uv_ip4_name(const struct sockaddr_in *src, char *dst, size_t size)
UV_EXTERN void * uv_fs_get_ptr(const uv_fs_t *)
UV_EXTERN int uv_metrics_info(uv_loop_t *loop, uv_metrics_t *metrics)
UV_EXTERN int uv_is_writable(const uv_stream_t *handle)
uv_clock_id
Definition uv.h:354
@ UV_CLOCK_REALTIME
Definition uv.h:356
@ UV_CLOCK_MONOTONIC
Definition uv.h:355
UV_EXTERN int uv_listen(uv_stream_t *stream, int backlog, uv_connection_cb cb)
UV_EXTERN int uv_cwd(char *buffer, size_t *size)
UV_EXTERN int uv_udp_set_source_membership(uv_udp_t *handle, const char *multicast_addr, const char *interface_addr, const char *source_addr, uv_membership membership)
UV_EXTERN int uv_udp_recv_stop(uv_udp_t *handle)
UV_EXTERN void uv_os_free_passwd(uv_passwd_t *pwd)
UV_EXTERN int uv_fs_event_start(uv_fs_event_t *handle, uv_fs_event_cb cb, const char *path, unsigned int flags)
UV_EXTERN void uv_freeaddrinfo(struct addrinfo *ai)
uv_fs_type
Definition uv.h:1371
@ UV_FS_STATFS
Definition uv.h:1407
@ UV_FS_CUSTOM
Definition uv.h:1373
@ UV_FS_SYMLINK
Definition uv.h:1397
@ UV_FS_FDATASYNC
Definition uv.h:1389
@ UV_FS_FCHMOD
Definition uv.h:1387
@ UV_FS_SCANDIR
Definition uv.h:1395
@ UV_FS_FTRUNCATE
Definition uv.h:1382
@ UV_FS_READDIR
Definition uv.h:1405
@ UV_FS_SENDFILE
Definition uv.h:1378
@ UV_FS_OPENDIR
Definition uv.h:1404
@ UV_FS_RENAME
Definition uv.h:1394
@ UV_FS_READLINK
Definition uv.h:1398
@ UV_FS_LUTIME
Definition uv.h:1409
@ UV_FS_STAT
Definition uv.h:1379
@ UV_FS_CHOWN
Definition uv.h:1399
@ UV_FS_FUTIME
Definition uv.h:1384
@ UV_FS_CHMOD
Definition uv.h:1386
@ UV_FS_REALPATH
Definition uv.h:1401
@ UV_FS_UNKNOWN
Definition uv.h:1372
@ UV_FS_UNLINK
Definition uv.h:1390
@ UV_FS_MKSTEMP
Definition uv.h:1408
@ UV_FS_RMDIR
Definition uv.h:1391
@ UV_FS_CLOSEDIR
Definition uv.h:1406
@ UV_FS_MKDTEMP
Definition uv.h:1393
@ UV_FS_CLOSE
Definition uv.h:1375
@ UV_FS_FSYNC
Definition uv.h:1388
@ UV_FS_FCHOWN
Definition uv.h:1400
@ UV_FS_READ
Definition uv.h:1376
@ UV_FS_COPYFILE
Definition uv.h:1402
@ UV_FS_MKDIR
Definition uv.h:1392
@ UV_FS_UTIME
Definition uv.h:1383
@ UV_FS_ACCESS
Definition uv.h:1385
@ UV_FS_FSTAT
Definition uv.h:1381
@ UV_FS_LCHOWN
Definition uv.h:1403
@ UV_FS_LSTAT
Definition uv.h:1380
@ UV_FS_OPEN
Definition uv.h:1374
@ UV_FS_WRITE
Definition uv.h:1377
@ UV_FS_LINK
Definition uv.h:1396
UV_EXTERN int uv_fs_lstat(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
UV_EXTERN int uv_fs_fchown(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
UV_EXTERN int uv_loop_init(uv_loop_t *loop)
UV_EXTERN int uv_prepare_start(uv_prepare_t *prepare, uv_prepare_cb cb)
UV_EXTERN int uv_os_get_passwd2(uv_passwd_t *pwd, uv_uid_t uid)
UV_EXTERN void uv_mutex_destroy(uv_mutex_t *handle)
UV_EXTERN char * uv_strerror_r(int err, char *buf, size_t buflen)
UV_EXTERN void uv_tty_set_vterm_state(uv_tty_vtermstate_t state)
UV_EXTERN unsigned int uv_available_parallelism(void)
UV_EXTERN int uv_pipe_pending_count(uv_pipe_t *handle)
UV_EXTERN int uv_pipe_getsockname(const uv_pipe_t *handle, char *buffer, size_t *size)
void(* uv_thread_cb)(void *arg)
Definition uv.h:1860
UV_EXTERN int uv_rwlock_tryrdlock(uv_rwlock_t *rwlock)
UV_EXTERN int uv_fs_sendfile(uv_loop_t *loop, uv_fs_t *req, uv_file out_fd, uv_file in_fd, int64_t in_offset, size_t length, uv_fs_cb cb)
UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t *cpu_infos, int count)
UV_EXTERN int uv_getnameinfo(uv_loop_t *loop, uv_getnameinfo_t *req, uv_getnameinfo_cb getnameinfo_cb, const struct sockaddr *addr, int flags)
UV_EXTERN int uv_try_write(uv_stream_t *handle, const uv_buf_t bufs[], unsigned int nbufs)
UV_EXTERN int uv_pipe_init(uv_loop_t *, uv_pipe_t *handle, int ipc)
uv_membership
Definition uv.h:414
@ UV_JOIN_GROUP
Definition uv.h:416
@ UV_LEAVE_GROUP
Definition uv.h:415
UV_EXTERN int uv_tcp_nodelay(uv_tcp_t *handle, int enable)
UV_PRIVATE_REQ_TYPES UV_EXTERN int uv_shutdown(uv_shutdown_t *req, uv_stream_t *handle, uv_shutdown_cb cb)
#define UV_ERRNO_MAP(XX)
Definition uv.h:72
UV_EXTERN int uv_sem_trywait(uv_sem_t *sem)
UV_EXTERN int uv_run(uv_loop_t *, uv_run_mode mode)
UV_EXTERN int uv_fs_statfs(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
UV_EXTERN size_t uv_stream_get_write_queue_size(const uv_stream_t *stream)
UV_EXTERN const char * uv_strerror(int err)
UV_EXTERN int uv_fs_poll_init(uv_loop_t *loop, uv_fs_poll_t *handle)
UV_EXTERN void uv_mutex_unlock(uv_mutex_t *handle)
UV_EXTERN void uv_rwlock_wrunlock(uv_rwlock_t *rwlock)
UV_EXTERN int uv_replace_allocator(uv_malloc_func malloc_func, uv_realloc_func realloc_func, uv_calloc_func calloc_func, uv_free_func free_func)
UV_EXTERN void uv_handle_set_data(uv_handle_t *handle, void *data)
UV_EXTERN size_t uv_udp_get_send_queue_count(const uv_udp_t *handle)
UV_EXTERN size_t uv_udp_get_send_queue_size(const uv_udp_t *handle)
void(* uv_poll_cb)(uv_poll_t *handle, int status, int events)
Definition uv.h:331
UV_EXTERN int uv_signal_stop(uv_signal_t *handle)
UV_EXTERN int uv_os_homedir(char *buffer, size_t *size)
void *(* uv_calloc_func)(size_t count, size_t size)
Definition uv.h:277
UV_EXTERN int uv_fs_write(uv_loop_t *loop, uv_fs_t *req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb)
UV_EXTERN int uv_pipe_connect2(uv_connect_t *req, uv_pipe_t *handle, const char *name, size_t namelen, unsigned int flags, uv_connect_cb cb)
#define UV_REQ_FIELDS
Definition uv.h:429
UV_EXTERN void uv_key_set(uv_key_t *key, void *value)
UV_EXTERN uv_os_fd_t uv_get_osfhandle(int fd)
UV_EXTERN int uv_dlsym(uv_lib_t *lib, const char *name, void **ptr)
uv_tty_vtermstate_t
Definition uv.h:804
@ UV_TTY_UNSUPPORTED
Definition uv.h:813
@ UV_TTY_SUPPORTED
Definition uv.h:809
UV_EXTERN int uv_barrier_wait(uv_barrier_t *barrier)
UV_EXTERN int uv_socketpair(int type, int protocol, uv_os_sock_t socket_vector[2], int flags0, int flags1)
UV_EXTERN int uv_tty_set_mode(uv_tty_t *, uv_tty_mode_t mode)
UV_EXTERN const char * uv_req_type_name(uv_req_type type)
UV_EXTERN int uv_write2(uv_write_t *req, uv_stream_t *handle, const uv_buf_t bufs[], unsigned int nbufs, uv_stream_t *send_handle, uv_write_cb cb)
void(* uv_getnameinfo_cb)(uv_getnameinfo_t *req, int status, const char *hostname, const char *service)
Definition uv.h:345
UV_EXTERN int uv_fs_event_stop(uv_fs_event_t *handle)
UV_EXTERN int uv_thread_setpriority(uv_thread_t tid, int priority)
UV_EXTERN int uv_fs_chmod(uv_loop_t *loop, uv_fs_t *req, const char *path, int mode, uv_fs_cb cb)
uv_fs_event_flags
Definition uv.h:1710
@ UV_FS_EVENT_RECURSIVE
Definition uv.h:1734
@ UV_FS_EVENT_STAT
Definition uv.h:1727
@ UV_FS_EVENT_WATCH_ENTRY
Definition uv.h:1718
UV_EXTERN int uv_fs_fdatasync(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
UV_EXTERN int uv_udp_set_multicast_ttl(uv_udp_t *handle, int ttl)
UV_EXTERN char ** uv_setup_args(int argc, char **argv)
UV_EXTERN void uv_barrier_destroy(uv_barrier_t *barrier)
UV_EXTERN int uv_os_getenv(const char *name, char *buffer, size_t *size)
UV_EXTERN int uv_timer_stop(uv_timer_t *handle)
UV_EXTERN uint64_t uv_get_constrained_memory(void)
UV_EXTERN void uv_req_set_data(uv_req_t *req, void *data)
UV_EXTERN int uv_os_gethostname(char *buffer, size_t *size)
UV_EXTERN int uv_fs_readlink(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
UV_EXTERN int uv_udp_open(uv_udp_t *handle, uv_os_sock_t sock)
UV_EXTERN uv_fs_type uv_fs_get_type(const uv_fs_t *)
uv_fs_event
Definition uv.h:1654
@ UV_CHANGE
Definition uv.h:1656
@ UV_RENAME
Definition uv.h:1655
UV_EXTERN int uv_thread_equal(const uv_thread_t *t1, const uv_thread_t *t2)
UV_EXTERN int uv_fs_futime(uv_loop_t *loop, uv_fs_t *req, uv_file file, double atime, double mtime, uv_fs_cb cb)
UV_EXTERN uv_handle_type uv_pipe_pending_type(uv_pipe_t *handle)
UV_EXTERN uint64_t uv_now(const uv_loop_t *)
UV_EXTERN uv_req_type uv_req_get_type(const uv_req_t *req)
UV_EXTERN void uv_pipe_pending_instances(uv_pipe_t *handle, int count)
UV_EXTERN int uv_pipe_bind(uv_pipe_t *handle, const char *name)
UV_EXTERN int uv_fs_utime(uv_loop_t *loop, uv_fs_t *req, const char *path, double atime, double mtime, uv_fs_cb cb)
struct uv_process_options_s uv_process_options_t
UV_EXTERN uv_loop_t * uv_loop_new(void)
UV_EXTERN int uv_fs_mkstemp(uv_loop_t *loop, uv_fs_t *req, const char *tpl, uv_fs_cb cb)
UV_EXTERN int uv_os_uname(uv_utsname_t *buffer)
UV_EXTERN int uv_fs_get_system_error(const uv_fs_t *)
UV_EXTERN int uv_loop_fork(uv_loop_t *loop)
UV_EXTERN int uv_tcp_bind(uv_tcp_t *handle, const struct sockaddr *addr, unsigned int flags)
UV_EXTERN int uv_udp_try_send(uv_udp_t *handle, const uv_buf_t bufs[], unsigned int nbufs, const struct sockaddr *addr)
UV_EXTERN int uv_inet_ntop(int af, const void *src, char *dst, size_t size)
#define XX(code, _)
Definition uv.h:189
UV_EXTERN void uv_unref(uv_handle_t *)
UV_EXTERN int uv_udp_set_membership(uv_udp_t *handle, const char *multicast_addr, const char *interface_addr, uv_membership membership)
UV_EXTERN int uv_tty_reset_mode(void)
void(* uv_check_cb)(uv_check_t *handle)
Definition uv.h:335
UV_EXTERN char * uv_err_name_r(int err, char *buf, size_t buflen)
UV_EXTERN int uv_queue_work(uv_loop_t *loop, uv_work_t *req, uv_work_cb work_cb, uv_after_work_cb after_work_cb)
void(* uv_udp_recv_cb)(uv_udp_t *handle, ssize_t nread, const uv_buf_t *buf, const struct sockaddr *addr, unsigned flags)
Definition uv.h:706
UV_EXTERN void uv_rwlock_rdlock(uv_rwlock_t *rwlock)
UV_EXTERN int uv_fs_event_init(uv_loop_t *loop, uv_fs_event_t *handle)
UV_EXTERN int uv_fs_scandir(uv_loop_t *loop, uv_fs_t *req, const char *path, int flags, uv_fs_cb cb)
void(* uv_timer_cb)(uv_timer_t *handle)
Definition uv.h:332
UV_EXTERN int uv_is_closing(const uv_handle_t *handle)
UV_EXTERN int uv_check_stop(uv_check_t *check)
UV_EXTERN int uv_udp_init(uv_loop_t *, uv_udp_t *handle)
void(* uv_read_cb)(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf)
Definition uv.h:323
void(* uv_udp_send_cb)(uv_udp_send_t *req, int status)
Definition uv.h:705
UV_EXTERN int uv_fs_fchmod(uv_loop_t *loop, uv_fs_t *req, uv_file file, int mode, uv_fs_cb cb)
void(* uv_alloc_cb)(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf)
Definition uv.h:320
UV_EXTERN int uv_fs_chown(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
UV_EXTERN int uv_fs_lchown(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
UV_EXTERN int uv_thread_create_ex(uv_thread_t *tid, const uv_thread_options_t *params, uv_thread_cb entry, void *arg)
UV_EXTERN void uv_close(uv_handle_t *handle, uv_close_cb close_cb)
UV_EXTERN uv_handle_type uv_guess_handle(uv_file file)
UV_EXTERN int uv_fs_mkdtemp(uv_loop_t *loop, uv_fs_t *req, const char *tpl, uv_fs_cb cb)
UV_EXTERN int uv_thread_create(uv_thread_t *tid, uv_thread_cb entry, void *arg)
UV_EXTERN const char * uv_err_name(int err)
UV_EXTERN uint64_t uv_get_total_memory(void)
UV_EXTERN int uv_udp_connect(uv_udp_t *handle, const struct sockaddr *addr)
void *(* uv_realloc_func)(void *ptr, size_t size)
Definition uv.h:276
UV_EXTERN ssize_t uv_fs_get_result(const uv_fs_t *)
UV_EXTERN int uv_key_create(uv_key_t *key)
UV_EXTERN int uv_thread_setaffinity(uv_thread_t *tid, char *cpumask, char *oldmask, size_t mask_size)
UV_EXTERN int uv_udp_using_recvmmsg(const uv_udp_t *handle)
UV_EXTERN int uv_open_osfhandle(uv_os_fd_t os_fd)
#define UV_EXTERN
Definition uv.h:49
UV_EXTERN int uv_pipe(uv_file fds[2], int read_flags, int write_flags)
UV_EXTERN int uv_accept(uv_stream_t *server, uv_stream_t *client)
UV_EXTERN int uv_fs_scandir_next(uv_fs_t *req, uv_dirent_t *ent)
#define UV_REQ_TYPE_MAP(XX)
Definition uv.h:176
void(* uv_signal_cb)(uv_signal_t *handle, int signum)
Definition uv.h:411
UV_EXTERN void * uv_loop_get_data(const uv_loop_t *)
UV_EXTERN int uv_send_buffer_size(uv_handle_t *handle, int *value)
UV_EXTERN int uv_fs_unlink(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
UV_EXTERN int uv_pipe_getpeername(const uv_pipe_t *handle, char *buffer, size_t *size)
uv_dirent_type_t
Definition uv.h:1238
@ UV_DIRENT_FIFO
Definition uv.h:1243
@ UV_DIRENT_CHAR
Definition uv.h:1245
@ UV_DIRENT_DIR
Definition uv.h:1241
@ UV_DIRENT_UNKNOWN
Definition uv.h:1239
@ UV_DIRENT_BLOCK
Definition uv.h:1246
@ UV_DIRENT_LINK
Definition uv.h:1242
@ UV_DIRENT_FILE
Definition uv.h:1240
@ UV_DIRENT_SOCKET
Definition uv.h:1244
UV_EXTERN int uv_tty_get_winsize(uv_tty_t *, int *width, int *height)
UV_EXTERN int uv_udp_set_multicast_loop(uv_udp_t *handle, int on)
UV_EXTERN int uv_has_ref(const uv_handle_t *)
UV_EXTERN uint64_t uv_timer_get_repeat(const uv_timer_t *handle)
UV_EXTERN int uv_cond_timedwait(uv_cond_t *cond, uv_mutex_t *mutex, uint64_t timeout)
UV_EXTERN size_t uv_loop_size(void)
#define UV_LOOP_USE_IO_URING_SQPOLL
Definition uv.h:262
@ UV_THREAD_PRIORITY_HIGHEST
Definition uv.h:1314
@ UV_THREAD_PRIORITY_NORMAL
Definition uv.h:1316
@ UV_THREAD_PRIORITY_LOWEST
Definition uv.h:1318
@ UV_THREAD_PRIORITY_BELOW_NORMAL
Definition uv.h:1317
@ UV_THREAD_PRIORITY_ABOVE_NORMAL
Definition uv.h:1315
void(* uv_connect_cb)(uv_connect_t *req, int status)
Definition uv.h:327
UV_EXTERN int uv_uptime(double *uptime)
uv_errno_t
Definition uv.h:188
@ UV_ERRNO_MAX
Definition uv.h:192
void(* uv_idle_cb)(uv_idle_t *handle)
Definition uv.h:336
void(* uv_exit_cb)(uv_process_t *, int64_t exit_status, int term_signal)
Definition uv.h:337
UV_EXTERN int uv_os_tmpdir(char *buffer, size_t *size)
UV_EXTERN int uv_fs_close(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
UV_EXTERN void uv_rwlock_destroy(uv_rwlock_t *rwlock)
UV_EXTERN int uv_fs_poll_start(uv_fs_poll_t *handle, uv_fs_poll_cb poll_cb, const char *path, unsigned int interval)
UV_EXTERN int uv_tcp_init(uv_loop_t *, uv_tcp_t *handle)
UV_EXTERN int uv_tcp_simultaneous_accepts(uv_tcp_t *handle, int enable)
UV_EXTERN int uv_poll_init_socket(uv_loop_t *loop, uv_poll_t *handle, uv_os_sock_t socket)
UV_EXTERN int uv_tty_init(uv_loop_t *, uv_tty_t *, uv_file fd, int readable)
UV_EXTERN int uv_rwlock_trywrlock(uv_rwlock_t *rwlock)
UV_EXTERN void uv_library_shutdown(void)
UV_EXTERN int uv_os_setenv(const char *name, const char *value)
UV_EXTERN uv_loop_t * uv_default_loop(void)
UV_EXTERN int uv_is_readable(const uv_stream_t *handle)
UV_EXTERN int uv_loop_alive(const uv_loop_t *loop)
UV_EXTERN void uv_loadavg(double avg[3])
UV_EXTERN int uv_fs_symlink(uv_loop_t *loop, uv_fs_t *req, const char *path, const char *new_path, int flags, uv_fs_cb cb)
UV_EXTERN uint64_t uv_metrics_idle_time(uv_loop_t *loop)
UV_EXTERN int uv_getaddrinfo(uv_loop_t *loop, uv_getaddrinfo_t *req, uv_getaddrinfo_cb getaddrinfo_cb, const char *node, const char *service, const struct addrinfo *hints)
void(* uv_async_cb)(uv_async_t *handle)
Definition uv.h:333
UV_EXTERN int uv_async_init(uv_loop_t *, uv_async_t *async, uv_async_cb async_cb)
UV_EXTERN uv_stat_t * uv_fs_get_statbuf(uv_fs_t *)
UV_EXTERN int uv_udp_getsockname(const uv_udp_t *handle, struct sockaddr *name, int *namelen)
UV_EXTERN int uv_pipe_bind2(uv_pipe_t *handle, const char *name, size_t namelen, unsigned int flags)
UV_EXTERN int uv_mutex_trylock(uv_mutex_t *handle)
UV_EXTERN void uv_os_free_environ(uv_env_item_t *envitems, int count)
UV_EXTERN int uv_cancel(uv_req_t *req)
void(* uv_walk_cb)(uv_handle_t *handle, void *arg)
Definition uv.h:338
UV_EXTERN void uv_cond_wait(uv_cond_t *cond, uv_mutex_t *mutex)
UV_EXTERN size_t uv_utf16_length_as_wtf8(const uint16_t *utf16, ssize_t utf16_len)
UV_EXTERN int uv_utf16_to_wtf8(const uint16_t *utf16, ssize_t utf16_len, char **wtf8_ptr, size_t *wtf8_len_ptr)
UV_EXTERN void uv_cond_signal(uv_cond_t *cond)
UV_EXTERN int uv_fs_mkdir(uv_loop_t *loop, uv_fs_t *req, const char *path, int mode, uv_fs_cb cb)
UV_EXTERN int uv_cpumask_size(void)
struct uv_stdio_container_s uv_stdio_container_t
UV_EXTERN int uv_os_unsetenv(const char *name)
UV_EXTERN int uv_async_send(uv_async_t *async)
UV_EXTERN int uv_fs_readdir(uv_loop_t *loop, uv_fs_t *req, uv_dir_t *dir, uv_fs_cb cb)
uv_req_type
Definition uv.h:204
@ UV_REQ_TYPE_MAX
Definition uv.h:210
@ UV_UNKNOWN_REQ
Definition uv.h:205
UV_EXTERN int uv_loop_configure(uv_loop_t *loop, uv_loop_option option,...)
void(* uv_fs_cb)(uv_fs_t *req)
Definition uv.h:339
#define UV_HANDLE_TYPE_MAP(XX)
Definition uv.h:158
UV_EXTERN uv_pid_t uv_os_getppid(void)
UV_EXTERN void uv_loop_delete(uv_loop_t *)
UV_EXTERN int uv_fs_realpath(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
UV_EXTERN int uv_timer_again(uv_timer_t *handle)
UV_EXTERN int uv_fs_link(uv_loop_t *loop, uv_fs_t *req, const char *path, const char *new_path, uv_fs_cb cb)
UV_EXTERN int uv_udp_getpeername(const uv_udp_t *handle, struct sockaddr *name, int *namelen)
UV_EXTERN int uv_loop_close(uv_loop_t *loop)
UV_EXTERN void uv_sem_wait(uv_sem_t *sem)
UV_EXTERN void uv_cond_broadcast(uv_cond_t *cond)
UV_EXTERN int uv_fs_poll_stop(uv_fs_poll_t *handle)
UV_EXTERN int uv_fs_opendir(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
uv_poll_event
Definition uv.h:882
@ UV_WRITABLE
Definition uv.h:884
@ UV_DISCONNECT
Definition uv.h:885
@ UV_PRIORITIZED
Definition uv.h:886
@ UV_READABLE
Definition uv.h:883
UV_EXTERN int uv_signal_init(uv_loop_t *loop, uv_signal_t *handle)
UV_EXTERN int uv_inet_pton(int af, const char *src, void *dst)
UV_EXTERN int uv_fs_rmdir(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
UV_EXTERN int uv_fs_lutime(uv_loop_t *loop, uv_fs_t *req, const char *path, double atime, double mtime, uv_fs_cb cb)
UV_EXTERN uint64_t uv_timer_get_due_in(const uv_timer_t *handle)
UV_EXTERN void uv_pipe_connect(uv_connect_t *req, uv_pipe_t *handle, const char *name, uv_connect_cb cb)
UV_EXTERN int uv_tcp_getsockname(const uv_tcp_t *handle, struct sockaddr *name, int *namelen)
UV_EXTERN int uv_fs_closedir(uv_loop_t *loop, uv_fs_t *req, uv_dir_t *dir, uv_fs_cb cb)
UV_EXTERN void uv_dlclose(uv_lib_t *lib)
UV_EXTERN void uv_disable_stdio_inheritance(void)
UV_EXTERN uv_handle_type uv_handle_get_type(const uv_handle_t *handle)
UV_EXTERN void uv_timer_set_repeat(uv_timer_t *handle, uint64_t repeat)
UV_EXTERN int uv_fs_rename(uv_loop_t *loop, uv_fs_t *req, const char *path, const char *new_path, uv_fs_cb cb)
UV_EXTERN uint64_t uv_get_available_memory(void)
UV_EXTERN int uv_tty_get_vterm_state(uv_tty_vtermstate_t *state)
UV_EXTERN unsigned int uv_version(void)
UV_EXTERN int uv_poll_stop(uv_poll_t *handle)
UV_EXTERN int uv_clock_gettime(uv_clock_id clock_id, uv_timespec64_t *ts)
UV_EXTERN int uv_pipe_open(uv_pipe_t *, uv_file file)
UV_EXTERN int uv_os_get_group(uv_group_t *grp, uv_uid_t gid)
UV_EXTERN int uv_pipe_chmod(uv_pipe_t *handle, int flags)
UV_EXTERN int uv_ip6_name(const struct sockaddr_in6 *src, char *dst, size_t size)
UV_EXTERN int uv_udp_set_broadcast(uv_udp_t *handle, int on)
UV_EXTERN int uv_prepare_stop(uv_prepare_t *prepare)
UV_EXTERN int uv_sem_init(uv_sem_t *sem, unsigned int value)
UV_EXTERN int uv_fileno(const uv_handle_t *handle, uv_os_fd_t *fd)
UV_EXTERN void uv_update_time(uv_loop_t *)
UV_EXTERN void uv_rwlock_rdunlock(uv_rwlock_t *rwlock)
UV_EXTERN const char * uv_fs_get_path(const uv_fs_t *)
void(* uv_close_cb)(uv_handle_t *handle)
Definition uv.h:330
UV_EXTERN uv_thread_t uv_thread_self(void)
UV_EXTERN int uv_idle_start(uv_idle_t *idle, uv_idle_cb cb)
UV_EXTERN int uv_fs_copyfile(uv_loop_t *loop, uv_fs_t *req, const char *path, const char *new_path, int flags, uv_fs_cb cb)
UV_EXTERN int uv_mutex_init(uv_mutex_t *handle)
UV_EXTERN int uv_tcp_getpeername(const uv_tcp_t *handle, struct sockaddr *name, int *namelen)
UV_EXTERN void * uv_handle_get_data(const uv_handle_t *handle)
UV_EXTERN void uv_cond_destroy(uv_cond_t *cond)
UV_EXTERN int uv_cond_init(uv_cond_t *cond)
#define UV_STREAM_FIELDS
Definition uv.h:517
UV_EXTERN int uv_chdir(const char *dir)
UV_EXTERN uv_pid_t uv_os_getpid(void)
void(* uv_work_cb)(uv_work_t *req)
Definition uv.h:340
UV_EXTERN int uv_idle_init(uv_loop_t *, uv_idle_t *idle)
UV_EXTERN const char * uv_dlerror(const uv_lib_t *lib)
UV_EXTERN int uv_fs_event_getpath(uv_fs_event_t *handle, char *buffer, size_t *size)
uv_loop_option
Definition uv.h:258
@ UV_LOOP_BLOCK_SIGNAL
Definition uv.h:259
@ UV_METRICS_IDLE_TIME
Definition uv.h:260
void(* uv_shutdown_cb)(uv_shutdown_t *req, int status)
Definition uv.h:328
UV_EXTERN int uv_get_process_title(char *buffer, size_t size)
#define UV_WORK_PRIVATE_FIELDS
Definition win.h:650
#define UV_FS_PRIVATE_FIELDS
Definition win.h:624
int uv_pid_t
Definition win.h:246
HANDLE uv_os_fd_t
Definition win.h:245
#define UV_POLL_PRIVATE_FIELDS
Definition win.h:541
#define UV_SHUTDOWN_PRIVATE_FIELDS
Definition win.h:405
#define UV_TIMER_PRIVATE_FIELDS
Definition win.h:556
#define UV_UDP_SEND_PRIVATE_FIELDS
Definition win.h:408
#define UV_DIR_PRIVATE_FIELDS
Definition win.h:310
int uv_file
Definition win.h:243
#define UV_WRITE_PRIVATE_FIELDS
Definition win.h:396
#define UV_PROCESS_PRIVATE_FIELDS
Definition win.h:614
SOCKET uv_os_sock_t
Definition win.h:244
#define UV_IDLE_PRIVATE_FIELDS
Definition win.h:583
#define UV_PREPARE_PRIVATE_FIELDS
Definition win.h:573
#define UV_SIGNAL_PRIVATE_FIELDS
Definition win.h:665
#define UV_GETNAMEINFO_PRIVATE_FIELDS
Definition win.h:605
#define UV_CHECK_PRIVATE_FIELDS
Definition win.h:578
CRITICAL_SECTION uv_mutex_t
Definition win.h:252
unsigned char uv_uid_t
Definition win.h:302
HANDLE uv_sem_t
Definition win.h:250
#define UV_UDP_PRIVATE_FIELDS
Definition win.h:467
#define UV_TTY_PRIVATE_FIELDS
Definition win.h:509
unsigned char uv_gid_t
Definition win.h:303
#define UV_FS_EVENT_PRIVATE_FIELDS
Definition win.h:653
#define UV_GETADDRINFO_PRIVATE_FIELDS
Definition win.h:592
#define UV_TCP_PRIVATE_FIELDS
Definition win.h:459
#define UV_CONNECT_PRIVATE_FIELDS
Definition win.h:402
#define UV_ASYNC_PRIVATE_FIELDS
Definition win.h:567
#define UV_LOOP_PRIVATE_FIELDS
Definition win.h:331
#define UV_PIPE_PRIVATE_FIELDS
Definition win.h:499
HANDLE uv_thread_t
Definition win.h:248
#define UV_REQ_TYPE_PRIVATE
Definition win.h:368
intptr_t ssize_t
Definition win.h:27
#define UV_PRIVATE_REQ_TYPES
Definition win.h:411
#define UV__EOF
Definition errno.h:32
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
Returns a named argument to be used in a formatting function.
Definition base.h:2775