Lines Matching refs:r
48 int r = WSAStartup(MAKEWORD(2, 2), &wsa_data); in startup() local
49 ASSERT_OK(r); in startup()
68 int r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes); in create_tcp_socket() local
69 ASSERT_OK(r); in create_tcp_socket()
78 int r; in close_socket() local
80 r = closesocket(sock); in close_socket()
82 r = close(sock); in close_socket()
84 ASSERT_OK(r); in close_socket()
156 int r; in write1_cb() local
168 r = uv_write(&write_req, req->handle, &buf, 1, write1_cb); in write1_cb()
169 ASSERT_OK(r); in write1_cb()
176 int r; in timer_cb() local
179 r = uv_shutdown(&shutdown_req, (uv_stream_t*) &client, shutdown_cb); in timer_cb()
180 ASSERT_OK(r); in timer_cb()
188 int r; in connect_cb() local
196 r = uv_write(&write_req, stream, &buf, 1, write_cb); in connect_cb()
197 ASSERT_OK(r); in connect_cb()
200 r = uv_shutdown(&shutdown_req, stream, shutdown_cb); in connect_cb()
201 ASSERT_OK(r); in connect_cb()
204 r = uv_read_start(stream, alloc_cb, read_cb); in connect_cb()
205 ASSERT_OK(r); in connect_cb()
212 int r; in connect1_cb() local
220 r = uv_timer_init(uv_default_loop(), &tm); in connect1_cb()
221 ASSERT_OK(r); in connect1_cb()
223 r = uv_timer_start(&tm, timer_cb, 2000, 0); in connect1_cb()
224 ASSERT_OK(r); in connect1_cb()
227 r = uv_write(&write_req, stream, &buf, 1, write1_cb); in connect1_cb()
228 ASSERT_OK(r); in connect1_cb()
231 r = uv_read_start(stream, alloc_cb, read1_cb); in connect1_cb()
232 ASSERT_OK(r); in connect1_cb()
239 int r; in TEST_IMPL() local
247 r = uv_tcp_init(uv_default_loop(), &client); in TEST_IMPL()
248 ASSERT_OK(r); in TEST_IMPL()
250 r = uv_tcp_open(&client, sock); in TEST_IMPL()
251 ASSERT_OK(r); in TEST_IMPL()
253 r = uv_tcp_connect(&connect_req, in TEST_IMPL()
257 ASSERT_OK(r); in TEST_IMPL()
261 r = uv_tcp_init(uv_default_loop(), &client2); in TEST_IMPL()
262 ASSERT_OK(r); in TEST_IMPL()
264 r = uv_tcp_open(&client2, sock); in TEST_IMPL()
265 ASSERT_EQ(r, UV_EEXIST); in TEST_IMPL()
288 int r; in TEST_IMPL() local
294 r = uv_tcp_init(uv_default_loop(), &client); in TEST_IMPL()
295 ASSERT_OK(r); in TEST_IMPL()
297 r = uv_tcp_open(&client, sock1); in TEST_IMPL()
298 ASSERT_OK(r); in TEST_IMPL()
300 r = uv_tcp_open(&client, sock2); in TEST_IMPL()
301 ASSERT_EQ(r, UV_EBUSY); in TEST_IMPL()
378 int r; in TEST_IMPL() local
385 r = uv_tcp_init(uv_default_loop(), &client); in TEST_IMPL()
386 ASSERT_OK(r); in TEST_IMPL()
388 r = uv_tcp_open(&client, sock); in TEST_IMPL()
389 ASSERT_OK(r); in TEST_IMPL()
391 r = uv_tcp_connect(&connect_req, in TEST_IMPL()
395 ASSERT_OK(r); in TEST_IMPL()