Lines Matching refs:r
62 int r; in cl_send_cb() local
69 r = uv_udp_send(req, &client, &buf, 1, NULL, cl_send_cb); in cl_send_cb()
70 ASSERT_EQ(r, UV_EDESTADDRREQ); in cl_send_cb()
71 r = uv_udp_send(req, in cl_send_cb()
77 ASSERT_OK(r); in cl_send_cb()
107 int r; in TEST_IMPL() local
115 r = uv_udp_init(uv_default_loop(), &server); in TEST_IMPL()
116 ASSERT_OK(r); in TEST_IMPL()
118 r = uv_udp_bind(&server, (const struct sockaddr*) &lo_addr, 0); in TEST_IMPL()
119 ASSERT_OK(r); in TEST_IMPL()
121 r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); in TEST_IMPL()
122 ASSERT_OK(r); in TEST_IMPL()
124 r = uv_udp_init(uv_default_loop(), &client); in TEST_IMPL()
125 ASSERT_OK(r); in TEST_IMPL()
131 r = uv_udp_connect(&client, (const struct sockaddr*) &tmp_addr); in TEST_IMPL()
133 ASSERT_EQ(r, UV_EADDRNOTAVAIL); in TEST_IMPL()
135 ASSERT_OK(r); in TEST_IMPL()
136 r = uv_udp_connect(&client, NULL); in TEST_IMPL()
137 ASSERT_OK(r); in TEST_IMPL()
143 r = uv_udp_connect(&client, (const struct sockaddr*) &lo_addr); in TEST_IMPL()
144 ASSERT_OK(r); in TEST_IMPL()
145 r = uv_udp_connect(&client, (const struct sockaddr*) &ext_addr); in TEST_IMPL()
146 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
149 r = uv_udp_getpeername(&client, (struct sockaddr*) &tmp_addr, &addrlen); in TEST_IMPL()
150 ASSERT_OK(r); in TEST_IMPL()
153 r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &lo_addr); in TEST_IMPL()
154 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
155 r = uv_udp_try_send(&client, &buf, 1, NULL); in TEST_IMPL()
156 ASSERT_EQ(4, r); in TEST_IMPL()
157 r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &ext_addr); in TEST_IMPL()
158 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
160 r = uv_udp_connect(&client, NULL); in TEST_IMPL()
161 ASSERT_OK(r); in TEST_IMPL()
162 r = uv_udp_connect(&client, NULL); in TEST_IMPL()
163 ASSERT_EQ(r, UV_ENOTCONN); in TEST_IMPL()
166 r = uv_udp_getpeername(&client, (struct sockaddr*) &tmp_addr, &addrlen); in TEST_IMPL()
167 ASSERT_EQ(r, UV_ENOTCONN); in TEST_IMPL()
170 r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &lo_addr); in TEST_IMPL()
171 ASSERT_EQ(4, r); in TEST_IMPL()
172 r = uv_udp_try_send(&client, &buf, 1, NULL); in TEST_IMPL()
173 ASSERT_EQ(r, UV_EDESTADDRREQ); in TEST_IMPL()
176 r = uv_udp_connect(&client, (const struct sockaddr*) &lo_addr); in TEST_IMPL()
177 ASSERT_OK(r); in TEST_IMPL()
178 r = uv_udp_send(&req, in TEST_IMPL()
184 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
185 r = uv_udp_send(&req, &client, &buf, 1, NULL, cl_send_cb); in TEST_IMPL()
186 ASSERT_OK(r); in TEST_IMPL()