Home
last modified time | relevance | path

Searched refs:stream (Results 1 – 25 of 60) sorted by relevance

123

/libuv/src/unix/
H A Dstream.c240 stream = s->stream; in uv__stream_osx_select_cb()
365 s->stream = stream; in uv__stream_try_select()
528 stream->connection_cb(stream, 0); in uv__server_io()
736 uv__io_feed(stream->loop, &stream->io_watcher); in uv__write_req_finish()
938 stream->read_cb(stream, UV_EOF, buf); in uv__stream_eof()
1055 stream->read_cb(stream, UV_ENOBUFS, &buf); in uv__read()
1092 stream->read_cb(stream, 0, &buf); in uv__read()
1120 stream->read_cb(stream, err, &buf); in uv__read()
1140 stream->read_cb(stream, err, &buf); in uv__read()
1148 stream->read_cb(stream, nread, &buf); in uv__read()
[all …]
/libuv/test/
H A Dtest-ping-pong.c49 } stream; member
93 uv_stream_t* stream; in pinger_write_ping() local
98 stream = (uv_stream_t*) &pinger->stream.tcp; in pinger_write_ping()
121 static void pinger_read_cb(uv_stream_t* stream, in pinger_read_cb() argument
127 pinger = (pinger_t*) stream->data; in pinger_read_cb()
231 pinger->stream.tcp.data = pinger; in tcp_pinger_v6_new()
237 &pinger->stream.tcp, in tcp_pinger_v6_new()
262 pinger->stream.tcp.data = pinger; in tcp_pinger_new()
268 &pinger->stream.tcp, in tcp_pinger_new()
291 pinger->stream.pipe.data = pinger; in pipe_pinger_new()
[all …]
H A Dblackhole-server.c35 static void connection_cb(uv_stream_t* stream, int status);
37 static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf);
42 static void connection_cb(uv_stream_t* stream, int status) { in connection_cb() argument
47 ASSERT_PTR_EQ(stream, (uv_stream_t*)&tcp_server); in connection_cb()
52 r = uv_tcp_init(stream->loop, &conn->handle); in connection_cb()
55 r = uv_accept(stream, (uv_stream_t*)&conn->handle); in connection_cb()
72 static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { in read_cb() argument
81 conn = container_of(stream, conn_rec, handle); in read_cb()
83 r = uv_shutdown(&conn->shutdown_req, stream, shutdown_cb); in read_cb()
H A Dtest-tcp-read-stop-start.c33 static void on_read2(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf);
48 static void do_write(uv_stream_t* stream, uv_write_cb cb) { in do_write() argument
53 ASSERT_OK(uv_write(req, stream, &buf, 1, cb)); in do_write()
64 static void on_read1(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { in on_read1() argument
70 do_write(stream, on_write); in on_read1()
72 ASSERT_OK(uv_read_stop(stream)); in on_read1()
74 ASSERT_OK(uv_read_start(stream, on_alloc, on_read2)); in on_read1()
79 static void on_read2(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { in on_read2() argument
82 uv_close((uv_handle_t*)stream, NULL); in on_read2()
H A Dbenchmark-pound.c48 uv_stream_t stream; member
56 uv_tcp_t stream; member
64 uv_pipe_t stream; member
140 ASSERT_NOT_NULL(stream); in read_cb()
146 uv_close((uv_handle_t*)stream, close_cb); in read_cb()
202 r = uv_tcp_init(loop, (uv_tcp_t*)&p->stream); in tcp_make_connect()
208 (uv_tcp_t*) &p->stream, in tcp_make_connect()
222 p->stream.data = p; in tcp_make_connect()
229 r = uv_pipe_init(loop, (uv_pipe_t*)&p->stream, 0); in pipe_make_connect()
233 (uv_pipe_t*) &p->stream, in pipe_make_connect()
[all …]
H A Drunner.c386 void print_tests(FILE* stream) { in print_tests() argument
415 void print_lines(const char* buffer, size_t size, FILE* stream) { in print_lines() argument
421 fputs("# ", stream); in print_lines()
422 fwrite(start, 1, (int)(end - start), stream); in print_lines()
423 fputs("\n", stream); in print_lines()
424 fflush(stream); in print_lines()
430 fputs("# ", stream); in print_lines()
431 fwrite(start, 1, (int)(end - start), stream); in print_lines()
432 fputs("\n", stream); in print_lines()
433 fflush(stream); in print_lines()
H A Dbenchmark-pump.c171 static void read_cb(uv_stream_t* stream, ssize_t bytes, const uv_buf_t* buf) { in read_cb() argument
179 uv_close((uv_handle_t*)stream, read_sockets_close_cb); in read_cb()
202 static void do_write(uv_stream_t* stream) { in do_write() argument
211 r = uv_write(req, stream, &buf, 1, write_cb); in do_write()
278 uv_stream_t* stream; in connection_cb() local
285 stream = (uv_stream_t*)malloc(sizeof(uv_tcp_t)); in connection_cb()
286 r = uv_tcp_init(loop, (uv_tcp_t*)stream); in connection_cb()
289 stream = (uv_stream_t*)malloc(sizeof(uv_pipe_t)); in connection_cb()
290 r = uv_pipe_init(loop, (uv_pipe_t*)stream, 0); in connection_cb()
294 r = uv_accept(s, stream); in connection_cb()
[all …]
H A Decho-server.c170 uv_stream_t* stream; in on_connection() local
180 stream = malloc(sizeof(uv_tcp_t)); in on_connection()
181 ASSERT_NOT_NULL(stream); in on_connection()
182 r = uv_tcp_init(loop, (uv_tcp_t*)stream); in on_connection()
187 stream = malloc(sizeof(uv_pipe_t)); in on_connection()
188 ASSERT_NOT_NULL(stream); in on_connection()
189 r = uv_pipe_init(loop, (uv_pipe_t*)stream, 0); in on_connection()
199 stream->data = server; in on_connection()
201 r = uv_accept(server, stream); in on_connection()
204 r = uv_read_start(stream, echo_alloc, after_read); in on_connection()
H A Dtest-tcp-write-fail.c73 uv_stream_t* stream; in connect_cb() local
79 stream = req->handle; in connect_cb()
83 close_socket((uv_tcp_t*)stream); in connect_cb()
86 r = uv_write(&write_req, stream, &buf, 1, write_cb); in connect_cb()
H A Dtest-tcp-writealot.c115 uv_stream_t* stream; in connect_cb() local
121 stream = req->handle; in connect_cb()
133 r = uv_write(write_req, stream, send_bufs, CHUNKS_PER_WRITE, write_cb); in connect_cb()
138 r = uv_shutdown(&shutdown_req, stream, shutdown_cb); in connect_cb()
142 r = uv_read_start(stream, alloc_cb, read_cb); in connect_cb()
H A Dtest-tcp-open.c187 uv_stream_t* stream; in connect_cb() local
193 stream = req->handle; in connect_cb()
196 r = uv_write(&write_req, stream, &buf, 1, write_cb); in connect_cb()
200 r = uv_shutdown(&shutdown_req, stream, shutdown_cb); in connect_cb()
204 r = uv_read_start(stream, alloc_cb, read_cb); in connect_cb()
211 uv_stream_t* stream; in connect1_cb() local
217 stream = req->handle; in connect1_cb()
227 r = uv_write(&write_req, stream, &buf, 1, write1_cb); in connect1_cb()
231 r = uv_read_start(stream, alloc_cb, read1_cb); in connect1_cb()
H A Drunner.h123 void print_tests(FILE* stream);
126 void print_lines(const char* buffer, size_t size, FILE* stream);
150 int process_copy_output(process_info_t* p, FILE* stream);
H A Dtest-iouring-pollhup.c49 static void read_data2(uv_stream_t* stream, in read_data2() argument
78 static void read_data(uv_stream_t* stream, in read_data() argument
82 uv_close((uv_handle_t*) stream, NULL); in read_data()
H A Dtest-tcp-close-after-read-timeout.c39 static void on_client_read(uv_stream_t* stream,
67 static void on_client_read(uv_stream_t* stream, ssize_t nread, in on_client_read() argument
92 static void on_connection_read(uv_stream_t* stream, in on_connection_read() argument
97 uv_close((uv_handle_t*) stream, on_close); in on_connection_read()
H A Dtest-tcp-close-reset.c105 static void read_cb2(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { in read_cb2() argument
106 ASSERT_PTR_EQ((uv_tcp_t*)stream, &tcp_client); in read_cb2()
108 uv_close((uv_handle_t*) stream, NULL); in read_cb2()
148 static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { in read_cb() argument
149 ASSERT_PTR_EQ((uv_tcp_t*)stream, &tcp_accepted); in read_cb()
151 uv_close((uv_handle_t*) stream, NULL); in read_cb()
H A Dtest-tcp-close-accept.c87 static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { in read_cb() argument
91 pending_incoming = (uv_tcp_t*) stream - &tcp_incoming[0]; in read_cb()
93 ASSERT_OK(uv_read_stop(stream)); in read_cb()
96 loop = stream->loop; in read_cb()
H A Dtest-ipc-send-recv.c37 uv_stream_t stream; member
131 r = uv_accept(handle, &recv->stream); in recv_cb()
153 &ctx.send.stream, in connect_cb()
164 &ctx.send2.stream, in connect_cb()
342 r = uv_accept(handle, &recv->stream); in read_cb()
350 &recv->stream, in read_cb()
H A Dtest-pipe-close-stdout-read-stdin.c44 void read_stdin(uv_stream_t *stream, ssize_t nread, const uv_buf_t* buf) in read_stdin() argument
47 uv_close((uv_handle_t*)stream, NULL); in read_stdin()
/libuv/src/win/
H A Dstream.c32 if (uv__is_closing(stream)) { in uv_listen()
36 switch (stream->type) { in uv_listen()
38 err = uv__tcp_listen((uv_tcp_t*)stream, backlog, cb); in uv_listen()
171 int uv_try_write(uv_stream_t* stream, in uv_try_write() argument
174 if (stream->flags & UV_HANDLE_CLOSING) in uv_try_write()
176 if (!(stream->flags & UV_HANDLE_WRITABLE)) in uv_try_write()
179 switch (stream->type) { in uv_try_write()
193 int uv_try_write2(uv_stream_t* stream, in uv_try_write2() argument
199 return uv_try_write(stream, bufs, nbufs); in uv_try_write2()
217 handle->stream.conn.shutdown_req = req; in uv_shutdown()
[all …]
H A Dprocess-stdio.c235 uv_pipe_t* parent_pipe = (uv_pipe_t*) fdopt.data.stream; in uv__stdio_create()
240 assert(fdopt.data.stream->type == UV_NAMED_PIPE); in uv__stdio_create()
241 assert(!(fdopt.data.stream->flags & UV_HANDLE_CONNECTION)); in uv__stdio_create()
242 assert(!(fdopt.data.stream->flags & UV_HANDLE_PIPESERVER)); in uv__stdio_create()
310 uv_stream_t* stream = fdopt.data.stream; in uv__stdio_create() local
313 if (stream->type == UV_TTY) { in uv__stdio_create()
314 stream_handle = ((uv_tty_t*) stream)->handle; in uv__stdio_create()
316 } else if (stream->type == UV_NAMED_PIPE && in uv__stdio_create()
317 stream->flags & UV_HANDLE_CONNECTION) { in uv__stdio_create()
318 stream_handle = ((uv_pipe_t*) stream)->handle; in uv__stdio_create()
H A Dtcp.c210 assert(stream->stream.conn.write_reqs_pending == 0); in uv__process_tcp_shutdown_req()
211 assert(!(stream->flags & UV_HANDLE_SHUT)); in uv__process_tcp_shutdown_req()
212 assert(stream->flags & UV_HANDLE_CONNECTION); in uv__process_tcp_shutdown_req()
214 stream->stream.conn.shutdown_req = NULL; in uv__process_tcp_shutdown_req()
215 UNREGISTER_HANDLE_REQ(loop, stream); in uv__process_tcp_shutdown_req()
218 if (stream->flags & UV_HANDLE_CLOSING) in uv__process_tcp_shutdown_req()
224 stream->flags |= UV_HANDLE_SHUT; in uv__process_tcp_shutdown_req()
229 DECREASE_PENDING_REQ_COUNT(stream); in uv__process_tcp_shutdown_req()
557 handle->stream.serv.connection_cb = cb; in uv__tcp_listen()
592 handle->stream.serv.connection_cb = cb; in uv__tcp_listen()
[all …]
H A Dstream-inl.h39 handle->stream.conn.shutdown_req = NULL; in uv__stream_init()
40 handle->stream.conn.write_reqs_pending = 0; in uv__stream_init()
/libuv/docs/src/
H A Dstream.rst37 Callback called when data was read on a stream.
50 from the stream again is undefined.
95 Pointer to the stream where this write request is running.
99 Pointer to the stream being sent using this write request.
183 uv_write(&req1, stream, a, 2, cb);
184 uv_write(&req2, stream, b, 2, cb);
223 Returns 1 if the stream is readable, 0 otherwise.
227 Returns 1 if the stream is writable, 0 otherwise.
231 Enable or disable blocking mode for a stream.
248 the stream.
[all …]
H A Dprocess.rst107 uv_stream_t* stream;
132 * Open a new pipe into `data.stream`, per the flags below. The
133 * `data.stream` field must point to a uv_pipe_t object that has
134 * been initialized with `uv_pipe_init(loop, data.stream, ipc);`,
147 * file descriptor being used by the stream handle given by
148 * `data.stream`.
155 * flags may be specified to create a duplex data stream.
236 Union containing either the `stream` or `fd` to be passed on to the child
/libuv/src/
H A Duv-common.c562 if (stream == NULL) in uv__print_handles()
563 stream = stderr; in uv__print_handles()
578 fprintf(stream, in uv__print_handles()
589 void uv_print_all_handles(uv_loop_t* loop, FILE* stream) { in uv_print_all_handles() argument
590 uv__print_handles(loop, 0, stream); in uv_print_all_handles()
595 uv__print_handles(loop, 1, stream); in uv_print_active_handles()
895 int uv_read_start(uv_stream_t* stream, in uv_read_start() argument
901 if (stream->flags & UV_HANDLE_CLOSING) in uv_read_start()
904 if (stream->flags & UV_HANDLE_READING) in uv_read_start()
907 if (!(stream->flags & UV_HANDLE_READABLE)) in uv_read_start()
[all …]

Completed in 42 milliseconds

123