Sure. libuv makes no claims about when exactly the data will be sent (if ever), except that it will be sent at most once and will not be re-attempted after the uv_write callback is fired. (the receiving side may have even fewer guarantees on timing and duplication, depending on the socket protocol connecting them)
On Tue, Jan 1, 2019 at 7:42 PM Iñaki Baz Castillo <[email protected]> wrote: > Hi, trying to simplify, I do this: > > ------------------------------------------------------------ > // 1) Create a loop. > uv_loop_t* loop = new uv_loop_t; > uv_loop_init(loop); > > // 2) Create a pipe. > uv_pipe_t* pipe = new uv_pipe_t; > uv_pipe_init(::GetLoop(), (uv_handle_t*)pipe, 0); > > // 3) Send data over the pipe: > uv_write(req, (uv_stream_t*)pipe, &buffer, 1); > > // 4) Run the loop: > uv_run(loop, UV_RUN_DEFAULT); > ------------------------------------------------------------ > > And it works. This is, data is received in the other pipe side. > However, it ++ALSO++ works even if I do not call uv_run(). Does it > make sense? > > > -- > Iñaki Baz Castillo > <[email protected]> > > -- > You received this message because you are subscribed to the Google Groups > "libuv" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/libuv. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
