Lines Matching refs:r
68 int r; in after_read() local
75 r = uv_shutdown(req, handle, after_shutdown); in after_read()
76 ASSERT_OK(r); in after_read()
85 int r; in check_sockname() local
101 r = uv_ip4_name(&check_addr, (char*) check_ip, sizeof check_ip); in check_sockname()
102 ASSERT_OK(r); in check_sockname()
112 int r; in on_connection() local
122 r = uv_tcp_init(loop, handle); in on_connection()
123 ASSERT_OK(r); in on_connection()
128 r = uv_accept(server, (uv_stream_t*)handle); in on_connection()
129 ASSERT_OK(r); in on_connection()
132 r = uv_tcp_getsockname(handle, &sockname, &namelen); in on_connection()
133 ASSERT_OK(r); in on_connection()
138 r = uv_tcp_getpeername(handle, &peername, &namelen); in on_connection()
139 ASSERT_OK(r); in on_connection()
143 r = uv_read_start((uv_stream_t*)handle, alloc, after_read); in on_connection()
144 ASSERT_OK(r); in on_connection()
150 int r, namelen; in on_connect() local
155 r = uv_tcp_getsockname((uv_tcp_t*) req->handle, &sockname, &namelen); in on_connect()
156 ASSERT_OK(r); in on_connect()
161 r = uv_tcp_getpeername((uv_tcp_t*) req->handle, &peername, &namelen); in on_connect()
162 ASSERT_OK(r); in on_connect()
174 int r; in tcp_listener() local
178 r = uv_tcp_init(loop, &tcpServer); in tcp_listener()
179 if (r) { in tcp_listener()
184 r = uv_tcp_bind(&tcpServer, (const struct sockaddr*) &addr, 0); in tcp_listener()
185 if (r) { in tcp_listener()
190 r = uv_listen((uv_stream_t*)&tcpServer, 128, on_connection); in tcp_listener()
191 if (r) { in tcp_listener()
198 r = uv_tcp_getsockname(&tcpServer, &sockname, &namelen); in tcp_listener()
199 ASSERT_OK(r); in tcp_listener()
204 r = uv_tcp_getpeername(&tcpServer, &peername, &namelen); in tcp_listener()
205 ASSERT_EQ(r, UV_ENOTCONN); in tcp_listener()
215 int r, namelen; in tcp_connector() local
219 r = uv_tcp_init(loop, &tcp); in tcp_connector()
221 ASSERT(!r); in tcp_connector()
223 r = uv_tcp_connect(&connect_req, in tcp_connector()
227 ASSERT(!r); in tcp_connector()
231 r = uv_tcp_getsockname(&tcp, &sockname, &namelen); in tcp_connector()
232 ASSERT(!r); in tcp_connector()
246 int r; in udp_recv() local
257 r = uv_udp_getsockname(&udp, &sockname, &namelen); in udp_recv()
258 ASSERT_OK(r); in udp_recv()
276 int r; in udp_listener() local
280 r = uv_udp_init(loop, &udpServer); in udp_listener()
281 if (r) { in udp_listener()
286 r = uv_udp_bind(&udpServer, (const struct sockaddr*) &addr, 0); in udp_listener()
287 if (r) { in udp_listener()
294 r = uv_udp_getsockname(&udpServer, &sockname, &namelen); in udp_listener()
295 ASSERT_OK(r); in udp_listener()
299 r = uv_udp_recv_start(&udpServer, alloc, udp_recv); in udp_listener()
300 ASSERT_OK(r); in udp_listener()
309 int r; in udp_sender() local
311 r = uv_udp_init(loop, &udp); in udp_sender()
312 ASSERT(!r); in udp_sender()
317 r = uv_udp_send(&send_req, in udp_sender()
323 ASSERT(!r); in udp_sender()