Lines Matching refs:ctx2
66 static struct echo_ctx ctx2;
294 uv_close(&ctx2.recv.handle, NULL);
295 uv_close(&ctx2.recv2.handle, NULL);
296 uv_close((uv_handle_t*)&ctx2.channel, NULL);
297 uv_close((uv_handle_t*)&ctx2.listen, NULL);
320 ASSERT_PTR_EQ(pipe, &ctx2.channel);
324 recv = &ctx2.recv;
325 write_req = &ctx2.write_req;
327 recv = &ctx2.recv2;
328 write_req = &ctx2.write_req2;
335 r = uv_pipe_init(ctx2.channel.loop, &recv->pipe, 0);
337 r = uv_tcp_init(ctx2.channel.loop, &recv->tcp);
347 (uv_stream_t*)&ctx2.channel,
358 ASSERT_EQ(1, uv_is_readable((uv_stream_t*)&ctx2.channel));
359 ASSERT_EQ(1, uv_is_writable((uv_stream_t*)&ctx2.channel));
360 ASSERT_OK(uv_is_closing((uv_handle_t*)&ctx2.channel));
362 r = uv_read_start((uv_stream_t*)&ctx2.channel, alloc_cb, read_cb);
368 ASSERT_PTR_EQ(handle, (uv_stream_t*)&ctx2.listen);
371 r = uv_accept((uv_stream_t*)&ctx2.listen, (uv_stream_t*)&ctx2.channel);
382 memset(&ctx2, 0, sizeof(ctx2));
384 r = uv_pipe_init(loop, &ctx2.listen, 0);
387 r = uv_pipe_init(loop, &ctx2.channel, 1);
391 r = uv_pipe_bind(&ctx2.listen, TEST_PIPENAME_3);
394 r = uv_listen((uv_stream_t*)&ctx2.listen, SOMAXCONN, listen_cb);
397 r = uv_pipe_open(&ctx2.channel, 0);