Home
last modified time | relevance | path

Searched refs:uv_handle_t (Results 1 – 25 of 214) sorted by relevance

123456789

/libuv/test/
H A Dtest-active.c32 static void close_cb(uv_handle_t* handle) { in close_cb()
51 ASSERT_OK(uv_is_active((uv_handle_t*) &timer)); in TEST_IMPL()
52 ASSERT_OK(uv_is_closing((uv_handle_t*) &timer)); in TEST_IMPL()
57 ASSERT_EQ(1, uv_is_active((uv_handle_t*) &timer)); in TEST_IMPL()
58 ASSERT_OK(uv_is_closing((uv_handle_t*) &timer)); in TEST_IMPL()
63 ASSERT_OK(uv_is_active((uv_handle_t*) &timer)); in TEST_IMPL()
64 ASSERT_OK(uv_is_closing((uv_handle_t*) &timer)); in TEST_IMPL()
69 ASSERT_EQ(1, uv_is_active((uv_handle_t*) &timer)); in TEST_IMPL()
70 ASSERT_OK(uv_is_closing((uv_handle_t*) &timer)); in TEST_IMPL()
72 uv_close((uv_handle_t*) &timer, close_cb); in TEST_IMPL()
[all …]
H A Dtest-handle-fileno.c65 uv_close((uv_handle_t*) &idle, NULL); in TEST_IMPL()
69 r = uv_fileno((uv_handle_t*) &tcp, &fd); in TEST_IMPL()
73 r = uv_fileno((uv_handle_t*) &tcp, &fd); in TEST_IMPL()
75 uv_close((uv_handle_t*) &tcp, NULL); in TEST_IMPL()
76 r = uv_fileno((uv_handle_t*) &tcp, &fd); in TEST_IMPL()
81 r = uv_fileno((uv_handle_t*) &udp, &fd); in TEST_IMPL()
85 r = uv_fileno((uv_handle_t*) &udp, &fd); in TEST_IMPL()
87 uv_close((uv_handle_t*) &udp, NULL); in TEST_IMPL()
88 r = uv_fileno((uv_handle_t*) &udp, &fd); in TEST_IMPL()
99 uv_close((uv_handle_t*) &pipe, NULL); in TEST_IMPL()
[all …]
H A Dtest-ref.c113 uv_unref((uv_handle_t*)&h); in TEST_IMPL()
124 uv_unref((uv_handle_t*)&h); in TEST_IMPL()
136 uv_unref((uv_handle_t*)&h); in TEST_IMPL()
148 uv_unref((uv_handle_t*)&h); in TEST_IMPL()
158 uv_unref((uv_handle_t*)h); in prepare_cb()
176 uv_unref((uv_handle_t*)&h); in TEST_IMPL()
188 uv_unref((uv_handle_t*)&h); in TEST_IMPL()
203 uv_unref((uv_handle_t*)&h); in TEST_IMPL()
215 uv_unref((uv_handle_t*)&h); in TEST_IMPL()
226 uv_unref((uv_handle_t*)&h); in TEST_IMPL()
[all …]
H A Dtest-loop-handles.c115 static void idle_2_close_cb(uv_handle_t* handle) { in idle_2_close_cb()
119 ASSERT_PTR_EQ(handle, (uv_handle_t*)&idle_2_handle); in idle_2_close_cb()
136 uv_close((uv_handle_t*)handle, idle_2_close_cb); in idle_2_cb()
169 static void idle_1_close_cb(uv_handle_t* handle) { in idle_1_close_cb()
179 static void prepare_1_close_cb(uv_handle_t* handle) { in prepare_1_close_cb()
182 ASSERT_PTR_EQ(handle, (uv_handle_t*)&prepare_1_handle); in prepare_1_close_cb()
188 static void check_close_cb(uv_handle_t* handle) { in check_close_cb()
191 ASSERT_PTR_EQ(handle, (uv_handle_t*)&check_handle); in check_close_cb()
197 static void prepare_2_close_cb(uv_handle_t* handle) { in prepare_2_close_cb()
200 ASSERT_PTR_EQ(handle, (uv_handle_t*)&prepare_2_handle); in prepare_2_close_cb()
[all …]
H A Dtest-stdio-over-pipes.c45 static void close_cb(uv_handle_t* handle) { in close_cb()
57 uv_close((uv_handle_t*)process, close_cb); in exit_cb()
58 uv_close((uv_handle_t*)&in, close_cb); in exit_cb()
59 uv_close((uv_handle_t*)&out, close_cb); in exit_cb()
76 static void on_alloc(uv_handle_t* handle, in on_alloc()
244 uv_unref((uv_handle_t*) &stdin_pipe1); in stdio_over_pipes_helper()
246 uv_unref((uv_handle_t*) &stdin_pipe2); in stdio_over_pipes_helper()
269 uv_ref((uv_handle_t*) &stdout_pipe1); in stdio_over_pipes_helper()
270 uv_ref((uv_handle_t*) &stdin_pipe1); in stdio_over_pipes_helper()
271 uv_ref((uv_handle_t*) &stdout_pipe2); in stdio_over_pipes_helper()
[all …]
H A Dtest-tcp-close-after-read-timeout.c36 static void on_client_alloc(uv_handle_t* handle,
44 static void on_close(uv_handle_t* handle);
58 static void on_client_alloc(uv_handle_t* handle, in on_client_alloc()
78 uv_close((uv_handle_t*) &client, on_close); in on_client_timeout()
79 uv_close((uv_handle_t*) &timer, on_close); in on_client_timeout()
97 uv_close((uv_handle_t*) stream, on_close); in on_connection_read()
114 static void on_close(uv_handle_t* handle) { in on_close()
115 ASSERT_NE(handle == (uv_handle_t*) &client || in on_close()
116 handle == (uv_handle_t*) &connection || in on_close()
117 handle == (uv_handle_t*) &timer, 0); in on_close()
[all …]
H A Dtest-timer.c41 static void once_close_cb(uv_handle_t* handle) { in once_close_cb()
55 ASSERT_OK(uv_is_active((uv_handle_t*) handle)); in once_cb()
59 uv_close((uv_handle_t*)handle, once_close_cb); in once_cb()
65 static void twice_close_cb(uv_handle_t* handle) { in twice_close_cb()
147 uv_unref((uv_handle_t*)&never); in TEST_IMPL()
262 uv_close((uv_handle_t*) &timer, NULL); in TEST_IMPL()
273 uv_close((uv_handle_t*) &tiny_timer, NULL); in tiny_timer_cb()
274 uv_close((uv_handle_t*) &huge_timer1, NULL); in tiny_timer_cb()
275 uv_close((uv_handle_t*) &huge_timer2, NULL); in tiny_timer_cb()
356 uv_close((uv_handle_t *)&handle, NULL); in TEST_IMPL()
[all …]
H A Dtest-socket-buffer-size.c34 static void close_cb(uv_handle_t* handle) { in close_cb()
39 static void check_buffer_size(uv_handle_t* handle) { in check_buffer_size()
63 check_buffer_size((uv_handle_t*) &tcp); in TEST_IMPL()
64 uv_close((uv_handle_t*) &tcp, close_cb); in TEST_IMPL()
68 check_buffer_size((uv_handle_t*) &udp); in TEST_IMPL()
69 uv_close((uv_handle_t*) &udp, close_cb); in TEST_IMPL()
H A Dtest-poll-multiple-handles.c37 static void close_cb(uv_handle_t* handle) { in close_cb()
89 uv_close((uv_handle_t*) &first_poll_handle, close_cb); in TEST_IMPL()
91 uv_unref((uv_handle_t*) &second_poll_handle); in TEST_IMPL()
94 uv_ref((uv_handle_t*) &second_poll_handle); in TEST_IMPL()
96 ASSERT(uv_is_active((uv_handle_t*) &second_poll_handle)); in TEST_IMPL()
97 uv_close((uv_handle_t*) &second_poll_handle, close_cb); in TEST_IMPL()
H A Dbenchmark-multi-accept.c84 static void ipc_close_cb(uv_handle_t* handle);
89 static void ipc_alloc_cb(uv_handle_t* handle,
96 static void sv_alloc_cb(uv_handle_t* handle,
102 static void cl_close_cb(uv_handle_t* handle);
135 uv_close((uv_handle_t*) ipc_pipe, NULL); in ipc_connection_cb()
146 static void ipc_close_cb(uv_handle_t* handle) { in ipc_close_cb()
163 static void ipc_alloc_cb(uv_handle_t* handle, in ipc_alloc_cb()
195 uv_close((uv_handle_t*) &ctx->ipc_pipe, NULL); in ipc_read_cb()
265 uv_unref((uv_handle_t*) &ctx->async_handle); in server_cb()
313 static void sv_alloc_cb(uv_handle_t* handle, in sv_alloc_cb()
[all …]
H A Dtest-tcp-oob.c39 static void alloc_cb(uv_handle_t* handle, in alloc_cb()
51 uv_close((uv_handle_t*) &server_handle, NULL); in idle_cb()
52 uv_close((uv_handle_t*) &client_handle, NULL); in idle_cb()
53 uv_close((uv_handle_t*) &peer_handle, NULL); in idle_cb()
54 uv_close((uv_handle_t*) idle, NULL); in idle_cb()
65 ASSERT_OK(uv_fileno((uv_handle_t*)handle, &fd)); in read_cb()
92 ASSERT_OK(uv_fileno((uv_handle_t*) &client_handle, &fd)); in connection_cb()
H A Dtest-pipe-server-close.c37 static void pipe_close_cb(uv_handle_t* handle) { in pipe_close_cb()
38 ASSERT_NE(handle == (uv_handle_t*) &pipe_client || in pipe_close_cb()
39 handle == (uv_handle_t*) &pipe_server, 0); in pipe_close_cb()
50 uv_close((uv_handle_t*) &pipe_client, pipe_close_cb); in pipe_client_connect_cb()
51 uv_close((uv_handle_t*) &pipe_server, pipe_close_cb); in pipe_client_connect_cb()
H A Dtest-fs-event.c121 static void close_cb(uv_handle_t* handle) { in close_cb()
145 uv_close((uv_handle_t*)handle, close_cb); in fs_event_cb_dir()
158 uv_close((uv_handle_t*)handle, close_cb); in fs_event_cb_del_dir()
190 uv_close((uv_handle_t*)handle, close_cb); in fs_event_del_dir()
361 uv_close((uv_handle_t*)handle, close_cb); in fs_event_cb_file()
377 uv_close((uv_handle_t*)handle, close_cb); in fs_event_cb_file_current_dir()
392 uv_close((uv_handle_t*)timer, NULL); in timer_cb_touch()
403 uv_close((uv_handle_t*)handle, NULL); in timer_cb_exact()
416 uv_close((uv_handle_t*) handle, NULL); in timer_cb_watch_twice()
824 uv_close((uv_handle_t*) &fs_event, NULL); in TEST_IMPL()
[all …]
H A Dtest-idle.c36 static void close_cb(uv_handle_t* handle) { in close_cb()
44 uv_close((uv_handle_t*) &idle_handle, close_cb); in timer_cb()
45 uv_close((uv_handle_t*) &check_handle, close_cb); in timer_cb()
46 uv_close((uv_handle_t*) &timer_handle, close_cb); in timer_cb()
118 uv_close((uv_handle_t*) &idle_handle, close_cb); in TEST_IMPL()
119 uv_close((uv_handle_t*) &check_handle, close_cb); in TEST_IMPL()
H A Decho-server.c39 static uv_handle_t* server;
44 static void on_close(uv_handle_t* peer);
45 static void on_server_close(uv_handle_t* handle);
69 uv_close((uv_handle_t*) req->handle, on_close); in after_shutdown()
148 static void on_close(uv_handle_t* peer) { in on_close()
153 static void echo_alloc(uv_handle_t* handle, in echo_alloc()
160 static void slab_alloc(uv_handle_t* handle, in slab_alloc()
257 server = (uv_handle_t*)&tcpServer; in tcp4_echo_start()
291 server = (uv_handle_t*)&tcpServer; in tcp6_echo_start()
325 server = (uv_handle_t*)&udpServer; in udp4_echo_start()
[all …]
H A Dtest-ipc.c83 uv_close((uv_handle_t*)server, NULL); in on_connection()
96 uv_close((uv_handle_t*)process, NULL); in exit_cb()
100 static void on_alloc(uv_handle_t* handle, in on_alloc()
206 uv_close((uv_handle_t*)&channel, NULL); in on_read()
270 uv_close((uv_handle_t*)&tcp_server, NULL); in on_read_listen_after_bound_twice()
273 uv_close((uv_handle_t*)&channel, NULL); in on_read_listen_after_bound_twice()
345 uv_close((uv_handle_t*)tcp, NULL); in on_tcp_read()
346 uv_close((uv_handle_t*)&channel, NULL); in on_tcp_read()
545 static void close_cb(uv_handle_t* handle) { in close_cb()
552 uv_close((uv_handle_t*)&channel, close_cb); in conn_notify_write_cb()
[all …]
H A Dtest-pipe-bind-error.c39 static void close_cb(uv_handle_t* handle) { in close_cb()
64 uv_close((uv_handle_t*)&server1, close_cb); in TEST_IMPL()
65 uv_close((uv_handle_t*)&server2, close_cb); in TEST_IMPL()
86 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL()
108 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL()
132 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL()
146 uv_close((uv_handle_t*) &server, NULL); in TEST_IMPL()
162 uv_close((uv_handle_t*) connect_req->handle, close_cb); in connect_overlong_cb()
H A Dtest-tcp-shutdown-after-write.c42 static void close_cb(uv_handle_t* handle) { in close_cb()
43 if (handle == (uv_handle_t*)&conn) in close_cb()
45 else if (handle == (uv_handle_t*)&timer) in close_cb()
52 static void alloc_cb(uv_handle_t* handle, in alloc_cb()
65 uv_close((uv_handle_t*)handle, close_cb); in timer_cb()
100 uv_close((uv_handle_t*)&conn, close_cb); in shutdown_cb()
H A Dtest-tcp-unexpected-read.c42 uv_close((uv_handle_t*) &check_handle, NULL); in timer_cb()
43 uv_close((uv_handle_t*) &timer_handle, NULL); in timer_cb()
44 uv_close((uv_handle_t*) &server_handle, NULL); in timer_cb()
45 uv_close((uv_handle_t*) &client_handle, NULL); in timer_cb()
46 uv_close((uv_handle_t*) &peer_handle, NULL); in timer_cb()
50 static void alloc_cb(uv_handle_t* handle, in alloc_cb()
H A Dtest-shutdown-eof.c42 static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { in alloc_cb()
114 static void tcp_close_cb(uv_handle_t* handle) { in tcp_close_cb()
115 ASSERT_PTR_EQ(handle, (uv_handle_t*) &tcp); in tcp_close_cb()
126 static void timer_close_cb(uv_handle_t* handle) { in timer_close_cb()
127 ASSERT_PTR_EQ(handle, (uv_handle_t*) &timer); in timer_close_cb()
134 uv_close((uv_handle_t*) handle, timer_close_cb); in timer_cb()
141 uv_close((uv_handle_t*) &tcp, tcp_close_cb); in timer_cb()
H A Dtest-getters-setters.c76 ASSERT_EQ(uv_handle_get_type((uv_handle_t*)pipe), UV_NAMED_PIPE); in TEST_IMPL()
78 ASSERT_PTR_EQ(uv_handle_get_loop((uv_handle_t*)pipe), loop); in TEST_IMPL()
80 ASSERT_PTR_EQ(uv_handle_get_data((uv_handle_t*)pipe), &cookie2); in TEST_IMPL()
81 uv_handle_set_data((uv_handle_t*)pipe, &cookie1); in TEST_IMPL()
82 ASSERT_PTR_EQ(uv_handle_get_data((uv_handle_t*)pipe), &cookie1); in TEST_IMPL()
89 uv_close((uv_handle_t*)pipe, NULL); in TEST_IMPL()
H A Dtest-tcp-rst.c33 static void close_cb(uv_handle_t* handle) { in close_cb()
34 ASSERT_PTR_EQ(handle, (uv_handle_t*) &tcp); in close_cb()
39 static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { in alloc_cb()
51 ASSERT_OK(uv_fileno((uv_handle_t*) t, &fd)); in read_cb()
55 uv_close((uv_handle_t *) t, close_cb); in read_cb()
/libuv/src/
H A Dfs-poll.c54 static void timer_close_cb(uv_handle_t* handle);
60 uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_POLL); in uv_fs_poll_init()
75 if (uv_is_active((uv_handle_t*)handle)) in uv_fs_poll_start()
119 if (!uv_is_active((uv_handle_t*)handle)) in uv_fs_poll_stop()
129 if (uv_is_active((uv_handle_t*)&ctx->timer_handle)) in uv_fs_poll_stop()
130 uv_close((uv_handle_t*)&ctx->timer_handle, timer_close_cb); in uv_fs_poll_stop()
142 if (!uv_is_active((uv_handle_t*)handle)) { in uv_fs_poll_getpath()
168 uv__make_close_pending((uv_handle_t*)handle); in uv__fs_poll_close()
221 uv_close((uv_handle_t*)&ctx->timer_handle, timer_close_cb); in poll_cb()
234 static void timer_close_cb(uv_handle_t* timer) { in timer_close_cb()
[all …]
/libuv/docs/src/
H A Dhandle.rst4 :c:type:`uv_handle_t` --- Base handle
7 `uv_handle_t` is the base type for all libuv handle types.
19 .. c:type:: uv_handle_t
83 .. c:type:: void (*uv_close_cb)(uv_handle_t* handle)
91 .. c:member:: uv_loop_t* uv_handle_t.loop
95 .. c:member:: uv_handle_type uv_handle_t.type
99 .. c:member:: void* uv_handle_t.data
115 .. c:function:: int uv_is_active(const uv_handle_t* handle)
159 .. c:function:: void uv_ref(uv_handle_t* handle)
166 .. c:function:: void uv_unref(uv_handle_t* handle)
[all …]
/libuv/src/win/
H A Dhandle-inl.h58 uv__want_endgame(loop, (uv_handle_t*)handle); \
69 uv__active_handle_add((uv_handle_t*) (handle)); \
79 uv__active_handle_rm((uv_handle_t*) (handle)); \
84 (handle)->close_cb((uv_handle_t*) (handle)); \
88 INLINE static void uv__want_endgame(uv_loop_t* loop, uv_handle_t* handle) { in uv__want_endgame()
99 uv_handle_t* handle; in uv__process_endgames()

Completed in 94 milliseconds

123456789