summaryrefslogtreecommitdiff
path: root/deps/uv/include
diff options
context:
space:
mode:
authorIgor Zinkovsky <igorzi@microsoft.com>2012-01-30 15:57:08 -0800
committerIgor Zinkovsky <igorzi@microsoft.com>2012-01-30 15:57:08 -0800
commitff40253566089cd5b89c1e6efca32d3b5772dbcb (patch)
tree01b4c194f0db0b3d245710f15ccfeb1f9ed81fbe /deps/uv/include
parente97b961815b8804e17d6793101960db53e4c32a2 (diff)
downloadnode-new-ff40253566089cd5b89c1e6efca32d3b5772dbcb.tar.gz
upgrade uv to 812e410772
Diffstat (limited to 'deps/uv/include')
-rw-r--r--deps/uv/include/uv-private/uv-unix.h3
-rw-r--r--deps/uv/include/uv-private/uv-win.h5
-rw-r--r--deps/uv/include/uv.h23
3 files changed, 31 insertions, 0 deletions
diff --git a/deps/uv/include/uv-private/uv-unix.h b/deps/uv/include/uv-private/uv-unix.h
index 24ef37cb9d..792ca84a2c 100644
--- a/deps/uv/include/uv-private/uv-unix.h
+++ b/deps/uv/include/uv-private/uv-unix.h
@@ -192,6 +192,9 @@ typedef void* uv_lib_t;
struct termios orig_termios; \
int mode;
+#define UV_STREAM_INFO_PRIVATE_FIELDS \
+ int fd;
+
/* UV_FS_EVENT_PRIVATE_FIELDS */
#if defined(__linux__)
diff --git a/deps/uv/include/uv-private/uv-win.h b/deps/uv/include/uv-private/uv-win.h
index 5a6a949e53..626eb6db4c 100644
--- a/deps/uv/include/uv-private/uv-win.h
+++ b/deps/uv/include/uv-private/uv-win.h
@@ -450,6 +450,11 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
wchar_t* dirw; \
char* buffer;
+#define UV_STREAM_INFO_PRIVATE_FIELDS \
+ union { \
+ WSAPROTOCOL_INFOW socket_info; \
+ };
+
int uv_utf16_to_utf8(const wchar_t* utf16Buffer, size_t utf16Size,
char* utf8Buffer, size_t utf8Size);
int uv_utf8_to_utf16(const char* utf8Buffer, wchar_t* utf16Buffer,
diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h
index cedf529375..0fbd4d6876 100644
--- a/deps/uv/include/uv.h
+++ b/deps/uv/include/uv.h
@@ -180,6 +180,7 @@ typedef struct uv_process_s uv_process_t;
typedef struct uv_counters_s uv_counters_t;
typedef struct uv_cpu_info_s uv_cpu_info_t;
typedef struct uv_interface_address_s uv_interface_address_t;
+typedef struct uv_stream_info_s uv_stream_info_t;
/* Request types */
typedef struct uv_req_s uv_req_t;
typedef struct uv_shutdown_s uv_shutdown_t;
@@ -531,6 +532,28 @@ UV_EXTERN int uv_tcp_getpeername(uv_tcp_t* handle, struct sockaddr* name,
int* namelen);
/*
+ * uv_stream_info_t is used to store exported stream (using uv_export),
+ * which can be imported into a different event-loop within the same process
+ * (using uv_import).
+ */
+struct uv_stream_info_s {
+ uv_handle_type type;
+ UV_STREAM_INFO_PRIVATE_FIELDS
+};
+
+/*
+ * Exports uv_stream_t as uv_stream_info_t value, which could
+ * be used to initialize shared streams within the same process.
+ */
+UV_EXTERN int uv_export(uv_stream_t* stream, uv_stream_info_t* info);
+
+/*
+ * Imports uv_stream_info_t value into uv_stream_t to initialize
+ * shared stream.
+ */
+UV_EXTERN int uv_import(uv_stream_t* stream, uv_stream_info_t* info);
+
+/*
* uv_tcp_connect, uv_tcp_connect6
* These functions establish IPv4 and IPv6 TCP connections. Provide an
* initialized TCP handle and an uninitialized uv_connect_t*. The callback