|
|
@ -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; |
|
|
@ -530,6 +531,28 @@ UV_EXTERN int uv_tcp_getsockname(uv_tcp_t* handle, struct sockaddr* name, |
|
|
|
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 |
|
|
|