Fix typos.
This commit is contained in:
parent
fce90652ed
commit
d513d9bb41
@ -1,7 +1,7 @@
|
|||||||
# libuv
|
# libuv
|
||||||
|
|
||||||
libuv is a new platform layer for Node. Its purpose is to abstract IOCP on
|
libuv is a new platform layer for Node. Its purpose is to abstract IOCP on
|
||||||
windows and libev on Unix systems. We intend to eventually contain all
|
Windows and libev on Unix systems. We intend to eventually contain all
|
||||||
platform differences in this library.
|
platform differences in this library.
|
||||||
|
|
||||||
http://nodejs.org/
|
http://nodejs.org/
|
||||||
|
|||||||
18
include/uv.h
18
include/uv.h
@ -106,7 +106,7 @@ typedef intptr_t ssize_t;
|
|||||||
XX( 35, ENOSYS, "function not implemented") \
|
XX( 35, ENOSYS, "function not implemented") \
|
||||||
XX( 36, EPIPE, "broken pipe") \
|
XX( 36, EPIPE, "broken pipe") \
|
||||||
XX( 37, EPROTO, "protocol error") \
|
XX( 37, EPROTO, "protocol error") \
|
||||||
XX( 38, EPROTONOSUPPORT, "protocol not suppored") \
|
XX( 38, EPROTONOSUPPORT, "protocol not supported") \
|
||||||
XX( 39, EPROTOTYPE, "protocol wrong type for socket") \
|
XX( 39, EPROTOTYPE, "protocol wrong type for socket") \
|
||||||
XX( 40, ETIMEDOUT, "connection timed out") \
|
XX( 40, ETIMEDOUT, "connection timed out") \
|
||||||
XX( 41, ECHARSET, "") \
|
XX( 41, ECHARSET, "") \
|
||||||
@ -263,7 +263,7 @@ typedef void (*uv_after_work_cb)(uv_work_t* req);
|
|||||||
* This will be called repeatedly after the uv_fs_event_t is initialized.
|
* This will be called repeatedly after the uv_fs_event_t is initialized.
|
||||||
* If uv_fs_event_t was initialized with a directory the filename parameter
|
* If uv_fs_event_t was initialized with a directory the filename parameter
|
||||||
* will be a relative path to a file contained in the directory.
|
* will be a relative path to a file contained in the directory.
|
||||||
* The events paramenter is an ORed mask of enum uv_fs_event elements.
|
* The events parameter is an ORed mask of enum uv_fs_event elements.
|
||||||
*/
|
*/
|
||||||
typedef void (*uv_fs_event_cb)(uv_fs_event_t* handle, const char* filename,
|
typedef void (*uv_fs_event_cb)(uv_fs_event_t* handle, const char* filename,
|
||||||
int events, int status);
|
int events, int status);
|
||||||
@ -315,8 +315,8 @@ UV_PRIVATE_REQ_TYPES
|
|||||||
*
|
*
|
||||||
* Shutdown the outgoing (write) side of a duplex stream. It waits for
|
* Shutdown the outgoing (write) side of a duplex stream. It waits for
|
||||||
* pending write requests to complete. The handle should refer to a
|
* pending write requests to complete. The handle should refer to a
|
||||||
* initialized stream. req should be an uninitalized shutdown request
|
* initialized stream. req should be an uninitialized shutdown request
|
||||||
* struct. The cb is a called after shutdown is complete.
|
* struct. The cb is called after shutdown is complete.
|
||||||
*/
|
*/
|
||||||
UV_EXTERN int uv_shutdown(uv_shutdown_t* req, uv_stream_t* handle,
|
UV_EXTERN int uv_shutdown(uv_shutdown_t* req, uv_stream_t* handle,
|
||||||
uv_shutdown_cb cb);
|
uv_shutdown_cb cb);
|
||||||
@ -509,7 +509,7 @@ UV_EXTERN int uv_tcp_getpeername(uv_tcp_t* handle, struct sockaddr* name,
|
|||||||
* uv_tcp_connect, uv_tcp_connect6
|
* uv_tcp_connect, uv_tcp_connect6
|
||||||
* These functions establish IPv4 and IPv6 TCP connections. Provide an
|
* These functions establish IPv4 and IPv6 TCP connections. Provide an
|
||||||
* initialized TCP handle and an uninitialized uv_connect_t*. The callback
|
* initialized TCP handle and an uninitialized uv_connect_t*. The callback
|
||||||
* will be made when the connection is estabished.
|
* will be made when the connection is established.
|
||||||
*/
|
*/
|
||||||
UV_EXTERN int uv_tcp_connect(uv_connect_t* req, uv_tcp_t* handle,
|
UV_EXTERN int uv_tcp_connect(uv_connect_t* req, uv_tcp_t* handle,
|
||||||
struct sockaddr_in address, uv_connect_cb cb);
|
struct sockaddr_in address, uv_connect_cb cb);
|
||||||
@ -884,7 +884,7 @@ UV_EXTERN int uv_timer_again(uv_timer_t* timer);
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the repeat value. Note that if the repeat value is set from a timer
|
* Set the repeat value. Note that if the repeat value is set from a timer
|
||||||
* callback it does not immediately take effect. If the timer was nonrepeating
|
* callback it does not immediately take effect. If the timer was non-repeating
|
||||||
* before, it will have been stopped. If it was repeating, then the old repeat
|
* before, it will have been stopped. If it was repeating, then the old repeat
|
||||||
* value will have been used to schedule the next timeout.
|
* value will have been used to schedule the next timeout.
|
||||||
*/
|
*/
|
||||||
@ -938,7 +938,7 @@ typedef struct uv_process_options_s {
|
|||||||
const char* file; /* Path to program to execute. */
|
const char* file; /* Path to program to execute. */
|
||||||
/*
|
/*
|
||||||
* Command line arguments. args[0] should be the path to the program. On
|
* Command line arguments. args[0] should be the path to the program. On
|
||||||
* Windows this uses CreateProcess which concatinates the arguments into a
|
* Windows this uses CreateProcess which concatenates the arguments into a
|
||||||
* string this can cause some strange errors. See the note at
|
* string this can cause some strange errors. See the note at
|
||||||
* windows_verbatim_arguments.
|
* windows_verbatim_arguments.
|
||||||
*/
|
*/
|
||||||
@ -962,7 +962,7 @@ typedef struct uv_process_options_s {
|
|||||||
/*
|
/*
|
||||||
* The user should supply pointers to initialized uv_pipe_t structs for
|
* The user should supply pointers to initialized uv_pipe_t structs for
|
||||||
* stdio. This is used to to send or receive input from the subprocess.
|
* stdio. This is used to to send or receive input from the subprocess.
|
||||||
* The user is reponsible for calling uv_close on them.
|
* The user is responsible for calling uv_close on them.
|
||||||
*/
|
*/
|
||||||
uv_pipe_t* stdin_stream;
|
uv_pipe_t* stdin_stream;
|
||||||
uv_pipe_t* stdout_stream;
|
uv_pipe_t* stdout_stream;
|
||||||
@ -1022,7 +1022,7 @@ UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
|
|||||||
* uninitialized uv_fs_t object.
|
* uninitialized uv_fs_t object.
|
||||||
*
|
*
|
||||||
* uv_fs_req_cleanup() must be called after completion of the uv_fs_
|
* uv_fs_req_cleanup() must be called after completion of the uv_fs_
|
||||||
* function to free any internal memory allocations associted with the
|
* function to free any internal memory allocations associated with the
|
||||||
* request.
|
* request.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ static void CALLBACK uv_ares_socksignal_tp(void* parameter,
|
|||||||
/* do not fail if error, thread may run after socket close */
|
/* do not fail if error, thread may run after socket close */
|
||||||
/* The code assumes that c-ares will write all pending data in the */
|
/* The code assumes that c-ares will write all pending data in the */
|
||||||
/* callback, unless the socket would block. We can clear the state here */
|
/* callback, unless the socket would block. We can clear the state here */
|
||||||
/* to avoid unecessary signals. */
|
/* to avoid unnecessary signals. */
|
||||||
WSAEnumNetworkEvents(sockhandle->sock,
|
WSAEnumNetworkEvents(sockhandle->sock,
|
||||||
sockhandle->h_event,
|
sockhandle->h_event,
|
||||||
&network_events);
|
&network_events);
|
||||||
@ -113,7 +113,7 @@ static void uv_ares_sockstate_cb(void *data, ares_socket_t sock, int read,
|
|||||||
if (read == 0 && write == 0) {
|
if (read == 0 && write == 0) {
|
||||||
/* if read and write are 0, cleanup existing data */
|
/* if read and write are 0, cleanup existing data */
|
||||||
/* The code assumes that c-ares does a callback with read = 0 and */
|
/* The code assumes that c-ares does a callback with read = 0 and */
|
||||||
/* write = 0 when the socket is closed. After we recieve this we stop */
|
/* write = 0 when the socket is closed. After we receive this we stop */
|
||||||
/* monitoring the socket. */
|
/* monitoring the socket. */
|
||||||
if (uv_handle_ares != NULL) {
|
if (uv_handle_ares != NULL) {
|
||||||
uv_req_t* uv_ares_req;
|
uv_req_t* uv_ares_req;
|
||||||
@ -244,7 +244,7 @@ void uv_process_ares_cleanup_req(uv_loop_t* loop, uv_ares_task_t* handle,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* stil busy - repost and try again */
|
/* still busy - repost and try again */
|
||||||
POST_COMPLETION_FOR_REQ(loop, req);
|
POST_COMPLETION_FOR_REQ(loop, req);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,7 +91,7 @@ static void uv_loop_init(uv_loop_t* loop) {
|
|||||||
|
|
||||||
|
|
||||||
static void uv_default_loop_init(void) {
|
static void uv_default_loop_init(void) {
|
||||||
/* Intialize libuv itself first */
|
/* Initialize libuv itself first */
|
||||||
uv_once(&uv_init_guard_, uv_init);
|
uv_once(&uv_init_guard_, uv_init);
|
||||||
|
|
||||||
/* Initialize the main loop */
|
/* Initialize the main loop */
|
||||||
|
|||||||
@ -249,7 +249,7 @@ void uv_pipe_endgame(uv_loop_t* loop, uv_pipe_t* handle) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Run FlushFileBuffers in the thhead pool. */
|
/* Run FlushFileBuffers in the thread pool. */
|
||||||
result = QueueUserWorkItem(pipe_shutdown_thread_proc,
|
result = QueueUserWorkItem(pipe_shutdown_thread_proc,
|
||||||
req,
|
req,
|
||||||
WT_EXECUTELONGFUNCTION);
|
WT_EXECUTELONGFUNCTION);
|
||||||
|
|||||||
@ -254,7 +254,7 @@ static wchar_t* path_search_walk_ext(const wchar_t *dir,
|
|||||||
* - CMD does not trim leading/trailing whitespace from path/pathex entries
|
* - CMD does not trim leading/trailing whitespace from path/pathex entries
|
||||||
* nor from the environment variables as a whole.
|
* nor from the environment variables as a whole.
|
||||||
*
|
*
|
||||||
* - When cmd.exe cannot read a directory, it wil just skip it and go on
|
* - When cmd.exe cannot read a directory, it will just skip it and go on
|
||||||
* searching. However, unlike posix-y systems, it will happily try to run a
|
* searching. However, unlike posix-y systems, it will happily try to run a
|
||||||
* file that is not readable/executable; if the spawn fails it will not
|
* file that is not readable/executable; if the spawn fails it will not
|
||||||
* continue searching.
|
* continue searching.
|
||||||
@ -400,7 +400,7 @@ wchar_t* quote_cmd_arg(const wchar_t *source, wchar_t *target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Expected intput/output:
|
* Expected input/output:
|
||||||
* input : hello"world
|
* input : hello"world
|
||||||
* output: "hello\"world"
|
* output: "hello\"world"
|
||||||
* input : hello""world
|
* input : hello""world
|
||||||
@ -1018,7 +1018,7 @@ int uv_spawn(uv_loop_t* loop, uv_process_t* process,
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* CreateProcessW failed, but this failure should be delivered */
|
/* CreateProcessW failed, but this failure should be delivered */
|
||||||
/* asynchronously to retain unix compatibility. So pretent spawn */
|
/* asynchronously to retain unix compatibility. So pretend spawn */
|
||||||
/* succeeded, and start a thread instead that prints an error */
|
/* succeeded, and start a thread instead that prints an error */
|
||||||
/* to the child's intended stderr. */
|
/* to the child's intended stderr. */
|
||||||
process->spawn_errno = GetLastError();
|
process->spawn_errno = GetLastError();
|
||||||
@ -1046,7 +1046,7 @@ done:
|
|||||||
close_child_stdio(process);
|
close_child_stdio(process);
|
||||||
} else {
|
} else {
|
||||||
/* We're keeping the handles open, the thread pool is going to have */
|
/* We're keeping the handles open, the thread pool is going to have */
|
||||||
/* it's way with them. But at least make them noninheritable. */
|
/* it's way with them. But at least make them non-inheritable. */
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < COUNTOF(process->child_stdio); i++) {
|
for (i = 0; i < COUNTOF(process->child_stdio); i++) {
|
||||||
SetHandleInformation(child_stdio[i], HANDLE_FLAG_INHERIT, 0);
|
SetHandleInformation(child_stdio[i], HANDLE_FLAG_INHERIT, 0);
|
||||||
|
|||||||
@ -1084,7 +1084,7 @@ int uv_tcp_duplicate_socket(uv_tcp_t* handle, int pid,
|
|||||||
/*
|
/*
|
||||||
* We're about to share the socket with another process. Because
|
* We're about to share the socket with another process. Because
|
||||||
* this is a listening socket, we assume that the other process will
|
* this is a listening socket, we assume that the other process will
|
||||||
* be accepting conections on it. So, before sharing the socket
|
* be accepting connections on it. So, before sharing the socket
|
||||||
* with another process, we call listen here in the parent process.
|
* with another process, we call listen here in the parent process.
|
||||||
* This needs to be modified if the socket is shared with
|
* This needs to be modified if the socket is shared with
|
||||||
* another process for anything other than accepting connections.
|
* another process for anything other than accepting connections.
|
||||||
@ -1137,7 +1137,7 @@ int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable) {
|
|||||||
|
|
||||||
handle->flags |= UV_HANDLE_TCP_SINGLE_ACCEPT;
|
handle->flags |= UV_HANDLE_TCP_SINGLE_ACCEPT;
|
||||||
|
|
||||||
/* Flip the changing flag if we have already queueed multiple accepts. */
|
/* Flip the changing flag if we have already queued multiple accepts. */
|
||||||
if (handle->flags & UV_HANDLE_LISTENING) {
|
if (handle->flags & UV_HANDLE_LISTENING) {
|
||||||
handle->flags |= UV_HANDLE_TCP_ACCEPT_STATE_CHANGING;
|
handle->flags |= UV_HANDLE_TCP_ACCEPT_STATE_CHANGING;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -86,7 +86,7 @@ uint64_t uv_hrtime(void) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Because we have no guarantee about the order of magniture of the */
|
/* Because we have no guarantee about the order of magnitude of the */
|
||||||
/* performance counter frequency, and there may not be much headroom to */
|
/* performance counter frequency, and there may not be much headroom to */
|
||||||
/* multiply by NANOSEC without overflowing, we use 128-bit math instead. */
|
/* multiply by NANOSEC without overflowing, we use 128-bit math instead. */
|
||||||
return ((uint64_t) counter.LowPart * NANOSEC / uv_hrtime_frequency_) +
|
return ((uint64_t) counter.LowPart * NANOSEC / uv_hrtime_frequency_) +
|
||||||
|
|||||||
@ -739,7 +739,7 @@ int uv_tty_read_start(uv_tty_t* handle, uv_alloc_cb alloc_cb,
|
|||||||
handle->read_cb = read_cb;
|
handle->read_cb = read_cb;
|
||||||
handle->alloc_cb = alloc_cb;
|
handle->alloc_cb = alloc_cb;
|
||||||
|
|
||||||
/* If reading was stopped and then started again, there could stell be a */
|
/* If reading was stopped and then started again, there could still be a */
|
||||||
/* read request pending. */
|
/* read request pending. */
|
||||||
if (handle->flags & UV_HANDLE_READ_PENDING) {
|
if (handle->flags & UV_HANDLE_READ_PENDING) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -362,7 +362,7 @@ int uv_udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloc_cb,
|
|||||||
handle->recv_cb = recv_cb;
|
handle->recv_cb = recv_cb;
|
||||||
handle->alloc_cb = alloc_cb;
|
handle->alloc_cb = alloc_cb;
|
||||||
|
|
||||||
/* If reading was stopped and then started again, there could stell be a */
|
/* If reading was stopped and then started again, there could still be a */
|
||||||
/* recv request pending. */
|
/* recv request pending. */
|
||||||
if (!(handle->flags & UV_HANDLE_READ_PENDING))
|
if (!(handle->flags & UV_HANDLE_READ_PENDING))
|
||||||
uv_udp_queue_recv(loop, handle);
|
uv_udp_queue_recv(loop, handle);
|
||||||
|
|||||||
@ -186,7 +186,7 @@ static void pinger_new() {
|
|||||||
pinger->state = 0;
|
pinger->state = 0;
|
||||||
pinger->pongs = 0;
|
pinger->pongs = 0;
|
||||||
|
|
||||||
/* Try to connec to the server and do NUM_PINGS ping-pongs. */
|
/* Try to connect to the server and do NUM_PINGS ping-pongs. */
|
||||||
r = uv_tcp_init(loop, &pinger->tcp);
|
r = uv_tcp_init(loop, &pinger->tcp);
|
||||||
ASSERT(!r);
|
ASSERT(!r);
|
||||||
|
|
||||||
|
|||||||
@ -156,7 +156,7 @@ int process_wait(process_info_t *vec, int n, int timeout) {
|
|||||||
HANDLE handles[MAXIMUM_WAIT_OBJECTS];
|
HANDLE handles[MAXIMUM_WAIT_OBJECTS];
|
||||||
DWORD timeout_api, result;
|
DWORD timeout_api, result;
|
||||||
|
|
||||||
/* If there's nothing to wait for, return immedately. */
|
/* If there's nothing to wait for, return immediately. */
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
* IN THE SOFTWARE.
|
* IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Don't complain about _snprintf being unsecure. */
|
/* Don't complain about _snprintf being insecure. */
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
|
||||||
/* Dont complain about write(), fileno() etc. being deprecated. */
|
/* Don't complain about write(), fileno() etc. being deprecated. */
|
||||||
#pragma warning(disable : 4996)
|
#pragma warning(disable : 4996)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -218,7 +218,7 @@ out:
|
|||||||
} else if (benchmark_output) {
|
} else if (benchmark_output) {
|
||||||
switch (process_output_size(main_proc)) {
|
switch (process_output_size(main_proc)) {
|
||||||
case -1:
|
case -1:
|
||||||
LOGF("%s: (unavailabe)\n", test);
|
LOGF("%s: (unavailable)\n", test);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
@ -138,7 +138,7 @@ static void write_cb(uv_write_t* req, int status) {
|
|||||||
/* After the data has been sent, we're going to wait for a while, then */
|
/* After the data has been sent, we're going to wait for a while, then */
|
||||||
/* start reading. This makes us certain that the message has been echoed */
|
/* start reading. This makes us certain that the message has been echoed */
|
||||||
/* back to our receive buffer when we start reading. This maximizes the */
|
/* back to our receive buffer when we start reading. This maximizes the */
|
||||||
/* tempation for the backend to use dirty stack for calling read_cb. */
|
/* temptation for the backend to use dirty stack for calling read_cb. */
|
||||||
nested++;
|
nested++;
|
||||||
r = uv_timer_init(uv_default_loop(), &timer);
|
r = uv_timer_init(uv_default_loop(), &timer);
|
||||||
ASSERT(r == 0);
|
ASSERT(r == 0);
|
||||||
|
|||||||
@ -97,7 +97,7 @@ void connection_fail(uv_connect_cb connect_cb) {
|
|||||||
/* There should be no servers listening on this port. */
|
/* There should be no servers listening on this port. */
|
||||||
server_addr = uv_ip4_addr("127.0.0.1", TEST_PORT);
|
server_addr = uv_ip4_addr("127.0.0.1", TEST_PORT);
|
||||||
|
|
||||||
/* Try to connec to the server and do NUM_PINGS ping-pongs. */
|
/* Try to connect to the server and do NUM_PINGS ping-pongs. */
|
||||||
r = uv_tcp_init(uv_default_loop(), &tcp);
|
r = uv_tcp_init(uv_default_loop(), &tcp);
|
||||||
ASSERT(!r);
|
ASSERT(!r);
|
||||||
|
|
||||||
|
|||||||
@ -152,7 +152,7 @@ static void connect_cb(uv_connect_t* req, int status) {
|
|||||||
ASSERT(status == 0);
|
ASSERT(status == 0);
|
||||||
|
|
||||||
/* Not that the server will send anything, but otherwise we'll never know */
|
/* Not that the server will send anything, but otherwise we'll never know */
|
||||||
/* when te server closes the connection. */
|
/* when the server closes the connection. */
|
||||||
r = uv_read_start((uv_stream_t*)(req->handle), alloc_cb, read_cb);
|
r = uv_read_start((uv_stream_t*)(req->handle), alloc_cb, read_cb);
|
||||||
ASSERT(r == 0);
|
ASSERT(r == 0);
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
* IN THE SOFTWARE.
|
* IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* FIXME we shouldnt need to branch in this file */
|
/* FIXME we shouldn't need to branch in this file */
|
||||||
#define UNIX (defined(__unix__) || defined(__POSIX__) || defined(__APPLE__))
|
#define UNIX (defined(__unix__) || defined(__POSIX__) || defined(__APPLE__))
|
||||||
|
|
||||||
#include "uv.h"
|
#include "uv.h"
|
||||||
|
|||||||
@ -83,7 +83,7 @@ static void check_sockname(struct sockaddr* addr, const char* compare_ip,
|
|||||||
char check_ip[17];
|
char check_ip[17];
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
/* Both adresses should be ipv4 */
|
/* Both addresses should be ipv4 */
|
||||||
ASSERT(check_addr.sin_family == AF_INET);
|
ASSERT(check_addr.sin_family == AF_INET);
|
||||||
ASSERT(compare_addr.sin_family == AF_INET);
|
ASSERT(compare_addr.sin_family == AF_INET);
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@
|
|||||||
* being started by a check_1 watcher. It verifies that a watcher is
|
* being started by a check_1 watcher. It verifies that a watcher is
|
||||||
* implicitly stopped when closed, and that a watcher can close itself
|
* implicitly stopped when closed, and that a watcher can close itself
|
||||||
* safely.
|
* safely.
|
||||||
* - There is a repeating timer. It does not keep te event loop alive
|
* - There is a repeating timer. It does not keep the event loop alive
|
||||||
* (ev_unref) but makes sure that the loop keeps polling the system for
|
* (ev_unref) but makes sure that the loop keeps polling the system for
|
||||||
* events.
|
* events.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -154,7 +154,7 @@ static void tcp_pinger_v6_new() {
|
|||||||
pinger->state = 0;
|
pinger->state = 0;
|
||||||
pinger->pongs = 0;
|
pinger->pongs = 0;
|
||||||
|
|
||||||
/* Try to connec to the server and do NUM_PINGS ping-pongs. */
|
/* Try to connect to the server and do NUM_PINGS ping-pongs. */
|
||||||
r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp);
|
r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp);
|
||||||
pinger->stream.tcp.data = pinger;
|
pinger->stream.tcp.data = pinger;
|
||||||
ASSERT(!r);
|
ASSERT(!r);
|
||||||
@ -179,7 +179,7 @@ static void tcp_pinger_new() {
|
|||||||
pinger->state = 0;
|
pinger->state = 0;
|
||||||
pinger->pongs = 0;
|
pinger->pongs = 0;
|
||||||
|
|
||||||
/* Try to connec to the server and do NUM_PINGS ping-pongs. */
|
/* Try to connect to the server and do NUM_PINGS ping-pongs. */
|
||||||
r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp);
|
r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp);
|
||||||
pinger->stream.tcp.data = pinger;
|
pinger->stream.tcp.data = pinger;
|
||||||
ASSERT(!r);
|
ASSERT(!r);
|
||||||
@ -203,7 +203,7 @@ static void pipe_pinger_new() {
|
|||||||
pinger->state = 0;
|
pinger->state = 0;
|
||||||
pinger->pongs = 0;
|
pinger->pongs = 0;
|
||||||
|
|
||||||
/* Try to connec to the server and do NUM_PINGS ping-pongs. */
|
/* Try to connect to the server and do NUM_PINGS ping-pongs. */
|
||||||
r = uv_pipe_init(uv_default_loop(), &pinger->stream.pipe, 0);
|
r = uv_pipe_init(uv_default_loop(), &pinger->stream.pipe, 0);
|
||||||
pinger->stream.pipe.data = pinger;
|
pinger->stream.pipe.data = pinger;
|
||||||
ASSERT(!r);
|
ASSERT(!r);
|
||||||
|
|||||||
@ -28,7 +28,7 @@ TEST_IMPL(tty) {
|
|||||||
uv_loop_t* loop = uv_default_loop();
|
uv_loop_t* loop = uv_default_loop();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Not necessarally a problem if this assert goes off. E.G you are piping
|
* Not necessarily a problem if this assert goes off. E.G you are piping
|
||||||
* this test to a file. 0 == stdin.
|
* this test to a file. 0 == stdin.
|
||||||
*/
|
*/
|
||||||
ASSERT(UV_TTY == uv_guess_handle(0));
|
ASSERT(UV_TTY == uv_guess_handle(0));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user