Lines Matching defs:handle
38 /* Used for passing around the listen handle, not part of the benchmark proper.
42 * 2. The worker threads connect to the IPC server and obtain a listen handle.
43 * 3. The worker threads start accepting requests on the listen handle.
84 static void ipc_close_cb(uv_handle_t* handle);
86 static void ipc_read_cb(uv_stream_t* handle,
89 static void ipc_alloc_cb(uv_handle_t* handle,
93 static void sv_async_cb(uv_async_t* handle);
95 static void sv_read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf);
96 static void sv_alloc_cb(uv_handle_t* handle,
101 static void cl_idle_cb(uv_idle_t* handle);
102 static void cl_close_cb(uv_handle_t* handle);
146 static void ipc_close_cb(uv_handle_t* handle) {
148 ctx = container_of(handle, struct ipc_peer_ctx, peer_handle);
163 static void ipc_alloc_cb(uv_handle_t* handle,
167 ctx = container_of(handle, struct ipc_client_ctx, ipc_pipe);
173 static void ipc_read_cb(uv_stream_t* handle,
181 ipc_pipe = (uv_pipe_t*) handle;
194 ASSERT_OK(uv_accept(handle, ctx->server_handle));
246 ctx.server_handle->data = "server handle";
282 static void sv_async_cb(uv_async_t* handle) {
284 ctx = container_of(handle, struct server_ctx, async_handle);
313 static void sv_alloc_cb(uv_handle_t* handle,
322 static void sv_read_cb(uv_stream_t* handle,
326 uv_close((uv_handle_t*) handle, (uv_close_cb) free);
337 static void cl_idle_cb(uv_idle_t* handle) {
338 struct client_ctx* ctx = container_of(handle, struct client_ctx, idle_handle);
344 static void cl_close_cb(uv_handle_t* handle) {
347 ctx = container_of(handle, struct client_ctx, client_handle);
354 ASSERT_OK(uv_tcp_init(handle->loop, (uv_tcp_t*) &ctx->client_handle));
366 uv_tcp_t* handle;
393 handle = (uv_tcp_t*) &ctx->client_handle;
394 handle->data = "client handle";
395 ASSERT_OK(uv_tcp_init(loop, handle));
397 handle,