@@ -58,6 +58,12 @@ extern "C" {
58
58
#include <stddef.h>
59
59
#include <stdint.h>
60
60
61
+ /* Internal type, do not use. */
62
+ struct uv__queue {
63
+ struct uv__queue * next ;
64
+ struct uv__queue * prev ;
65
+ };
66
+
61
67
#if defined(_WIN32 )
62
68
# include "uv/win.h"
63
69
# if !defined(BUILDING_UV_SHARED )
@@ -152,6 +158,7 @@ extern "C" {
152
158
XX(EILSEQ, "illegal byte sequence") \
153
159
XX(ESOCKTNOSUPPORT, "socket type not supported") \
154
160
XX(ENODATA, "no data available") \
161
+ XX(EUNATCH, "protocol driver not attached") \
155
162
156
163
#define UV_HANDLE_TYPE_MAP (XX ) \
157
164
XX(ASYNC, async) \
@@ -285,13 +292,13 @@ UV_EXTERN int uv_loop_init(uv_loop_t* loop);
285
292
UV_EXTERN int uv_loop_close (uv_loop_t * loop );
286
293
/*
287
294
* NOTE:
288
- * This function is DEPRECATED (to be removed after 0.12) , users should
295
+ * This function is DEPRECATED, users should
289
296
* allocate the loop manually and use uv_loop_init instead.
290
297
*/
291
298
UV_EXTERN uv_loop_t * uv_loop_new (void );
292
299
/*
293
300
* NOTE:
294
- * This function is DEPRECATED (to be removed after 0.12) . Users should use
301
+ * This function is DEPRECATED. Users should use
295
302
* uv_loop_close and free the memory manually instead.
296
303
*/
297
304
UV_EXTERN void uv_loop_delete (uv_loop_t * );
@@ -450,7 +457,7 @@ struct uv_shutdown_s {
450
457
uv_handle_type type ; \
451
458
/* private */ \
452
459
uv_close_cb close_cb ; \
453
- void * handle_queue [ 2 ]; \
460
+ struct uv__queue handle_queue ; \
454
461
UV_HANDLE_PRIVATE_FIELDS \
455
462
456
463
/* The abstract base class of all handles. */
@@ -848,6 +855,10 @@ inline int uv_tty_set_mode(uv_tty_t* handle, int mode) {
848
855
849
856
UV_EXTERN uv_handle_type uv_guess_handle (uv_os_fd_t file );
850
857
858
+ enum {
859
+ UV_PIPE_NO_TRUNCATE = 1u << 0
860
+ };
861
+
851
862
/*
852
863
* uv_pipe_t is a subclass of uv_stream_t.
853
864
*
@@ -864,10 +875,20 @@ struct uv_pipe_s {
864
875
UV_EXTERN int uv_pipe_init (uv_loop_t * , uv_pipe_t * handle , int ipc );
865
876
UV_EXTERN int uv_pipe_open (uv_pipe_t * , uv_os_fd_t file );
866
877
UV_EXTERN int uv_pipe_bind (uv_pipe_t * handle , const char * name );
878
+ UV_EXTERN int uv_pipe_bind2 (uv_pipe_t * handle ,
879
+ const char * name ,
880
+ size_t namelen ,
881
+ unsigned int flags );
867
882
UV_EXTERN void uv_pipe_connect (uv_connect_t * req ,
868
883
uv_pipe_t * handle ,
869
884
const char * name ,
870
885
uv_connect_cb cb );
886
+ UV_EXTERN int uv_pipe_connect2 (uv_connect_t * req ,
887
+ uv_pipe_t * handle ,
888
+ const char * name ,
889
+ size_t namelen ,
890
+ unsigned int flags ,
891
+ uv_connect_cb cb );
871
892
UV_EXTERN int uv_pipe_getsockname (const uv_pipe_t * handle ,
872
893
char * buffer ,
873
894
size_t * size );
@@ -1924,7 +1945,7 @@ struct uv_loop_s {
1924
1945
void * data ;
1925
1946
/* Loop reference counting. */
1926
1947
unsigned int active_handles ;
1927
- void * handle_queue [ 2 ] ;
1948
+ struct uv__queue handle_queue ;
1928
1949
union {
1929
1950
void * unused ;
1930
1951
unsigned int count ;
0 commit comments