Lines Matching refs:ctx
65 static struct test_ctx ctx; variable
99 ASSERT_PTR_EQ(pipe, &ctx.channel); in recv_cb()
103 recv = &ctx.recv; in recv_cb()
105 recv = &ctx.recv2; in recv_cb()
121 ASSERT_EQ(pending, ctx.expected_type); in recv_cb()
124 r = uv_pipe_init(ctx.channel.loop, &recv->pipe, 0); in recv_cb()
126 r = uv_tcp_init(ctx.channel.loop, &recv->tcp); in recv_cb()
138 uv_close((uv_handle_t*)&ctx.channel, NULL); in recv_cb()
146 ASSERT_PTR_EQ(req, &ctx.connect_req); in connect_cb()
150 r = uv_write2(&ctx.write_req, in connect_cb()
151 (uv_stream_t*)&ctx.channel, in connect_cb()
153 &ctx.send.stream, in connect_cb()
161 r = uv_write2(&ctx.write_req2, in connect_cb()
162 (uv_stream_t*)&ctx.channel, in connect_cb()
164 &ctx.send2.stream, in connect_cb()
168 r = uv_read_start((uv_stream_t*)&ctx.channel, alloc_cb, recv_cb); in connect_cb()
183 r = uv_pipe_init(uv_default_loop(), &ctx.channel, 1); in run_test()
186 uv_pipe_connect(&ctx.connect_req, &ctx.channel, TEST_PIPENAME_3, connect_cb); in run_test()
188 spawn_helper(&ctx.channel, &process, "ipc_send_recv_helper"); in run_test()
190 connect_cb(&ctx.connect_req, 0); in run_test()
209 ctx.expected_type = UV_NAMED_PIPE; in run_ipc_send_recv_pipe()
211 r = uv_pipe_init(uv_default_loop(), &ctx.send.pipe, 1); in run_ipc_send_recv_pipe()
214 r = uv_pipe_bind(&ctx.send.pipe, TEST_PIPENAME); in run_ipc_send_recv_pipe()
217 r = uv_pipe_init(uv_default_loop(), &ctx.send2.pipe, 1); in run_ipc_send_recv_pipe()
220 r = uv_pipe_bind(&ctx.send2.pipe, TEST_PIPENAME_2); in run_ipc_send_recv_pipe()
250 ctx.expected_type = UV_TCP; in run_ipc_send_recv_tcp()
252 r = uv_tcp_init(uv_default_loop(), &ctx.send.tcp); in run_ipc_send_recv_tcp()
255 r = uv_tcp_init(uv_default_loop(), &ctx.send2.tcp); in run_ipc_send_recv_tcp()
258 r = uv_tcp_bind(&ctx.send.tcp, (const struct sockaddr*) &addr, 0); in run_ipc_send_recv_tcp()
261 r = uv_tcp_bind(&ctx.send2.tcp, (const struct sockaddr*) &addr, 0); in run_ipc_send_recv_tcp()