Lines Matching refs:nread

144                     ssize_t nread,  in on_read()  argument
153 if (nread == 0) { in on_read()
159 if (nread < 0) { in on_read()
160 if (nread == UV_EOF) { in on_read()
165 printf("error recving on channel: %s\n", uv_strerror(nread)); in on_read()
169 fprintf(stderr, "got %d bytes\n", (int)nread); in on_read()
174 ASSERT_GT(nread, 0); in on_read()
193 ASSERT_MEM_EQ("hello\n", buf->base, nread); in on_read()
201 } else if (memcmp("accepted_connection\n", buf->base, nread) == 0) { in on_read()
214 ssize_t nread, in on_read_listen_after_bound_twice() argument
222 if (nread == 0) { in on_read_listen_after_bound_twice()
228 if (nread < 0) { in on_read_listen_after_bound_twice()
229 if (nread == UV_EOF) { in on_read_listen_after_bound_twice()
234 printf("error recving on channel: %s\n", uv_strerror(nread)); in on_read_listen_after_bound_twice()
238 fprintf(stderr, "got %d bytes\n", (int)nread); in on_read_listen_after_bound_twice()
242 ASSERT_GT(nread, 0); in on_read_listen_after_bound_twice()
337 static void on_tcp_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { in on_tcp_read() argument
338 ASSERT_GT(nread, 0); in on_tcp_read()
339 ASSERT_MEM_EQ("hello again\n", buf->base, nread); in on_tcp_read()
351 ssize_t nread, in on_read_connection() argument
359 if (nread == 0) { in on_read_connection()
365 if (nread < 0) { in on_read_connection()
366 if (nread == UV_EOF) { in on_read_connection()
371 printf("error recving on channel: %s\n", uv_strerror(nread)); in on_read_connection()
375 fprintf(stderr, "got %d bytes\n", (int)nread); in on_read_connection()
380 ASSERT_GT(nread, 0); in on_read_connection()
394 ASSERT_MEM_EQ("hello\n", buf->base, nread); in on_read_connection()
410 ssize_t nread, in on_read_send_zero() argument
412 ASSERT(nread == 0 || nread == UV_EOF); in on_read_send_zero()
571 ssize_t nread, in on_tcp_child_process_read() argument
576 if (nread < 0) { in on_tcp_child_process_read()
577 if (nread == UV_EOF) { in on_tcp_child_process_read()
582 printf("error recving on tcp connection: %s\n", uv_strerror(nread)); in on_tcp_child_process_read()
586 ASSERT_GT(nread, 0); in on_tcp_child_process_read()
587 ASSERT_MEM_EQ("world\n", buf->base, nread); in on_tcp_child_process_read()