History log of /libuv/src/win/stream.c (Results 1 – 25 of 47)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 07261493 17-May-2023 Santiago Gimeno

Revert "win: implement uv_try_write() for pipes(#3825 1/2)"

This reverts commit 244e0e20592f40fce87d573c9f7b6ff7f189c382.

For some reason this is breaking node.js IPC. I plan to inv

Revert "win: implement uv_try_write() for pipes(#3825 1/2)"

This reverts commit 244e0e20592f40fce87d573c9f7b6ff7f189c382.

For some reason this is breaking node.js IPC. I plan to investigate it
but we can let this for the next release.t

PR-URL: https://github.com/libuv/libuv/pull/4003

show more ...


Revision tags: v1.41.0, v1.40.0, v1.39.0, v1.38.1, v1.38.0, v1.37.0, v1.36.0, v1.35.0, v1.34.2, v1.34.1, v1.34.0, v1.33.1, v1.33.0, v1.32.0, v1.31.0, v1.30.1, v1.30.0, v1.29.1, v1.29.0, v1.28.0, v1.27.0, v1.26.0, v1.25.0, v1.24.1, v1.24.0, v1.23.2, v1.23.1, v1.23.0, v1.22.0, v1.21.0, v1.20.3, v1.20.2, v1.20.1, v1.20.0, v1.19.2, v1.19.1, v1.19.0, v1.18.0, v1.17.0, v1.16.1, v1.16.0, v1.15.0, v1.14.1, v1.14.0, v1.13.1, v1.13.0, v1.12.0, v1.11.0, v1.10.2, v1.10.1, v1.10.0, v0.10.37
# 244e0e20 25-May-2016 Ben Noordhuis

win: implement uv_try_write() for pipes(#3825 1/2)


# 7bccb562 03-Aug-2022 Santiago Gimeno

unix,win: remove UV_HANDLE_SHUTTING flag (#3705)

Replace it with a `uv__is_stream_shutting()` macro that checks the
`shutdown_req` field.

It partially fixes: https://github.com/

unix,win: remove UV_HANDLE_SHUTTING flag (#3705)

Replace it with a `uv__is_stream_shutting()` macro that checks the
`shutdown_req` field.

It partially fixes: https://github.com/libuv/libuv/issues/3663.

show more ...


# ee970e38 11-Jul-2022 Jameson Nash

win,shutdown: improve how shutdown is dispatched (#3649)

Split this off from endgame, so that it can be handled separately and
earlier, rather than trying to detect inside endgame which

win,shutdown: improve how shutdown is dispatched (#3649)

Split this off from endgame, so that it can be handled separately and
earlier, rather than trying to detect inside endgame which case we are
in. There appear to be some race conditions on the `handle` field still
however, which this does not yet attempt to address.

show more ...


# 8bcd689c 11-Jun-2022 theanarkh <2923878201@qq.com>

tcp,pipe: fail `bind` or `listen` after `close` (#3641)

Return `UV_EINVAL` in `bind` and `listen` when `handle` is
`UV_HANDLE_CLOSING` or `UV_HANDLE_CLOSED`.

Fixes: https://gith

tcp,pipe: fail `bind` or `listen` after `close` (#3641)

Return `UV_EINVAL` in `bind` and `listen` when `handle` is
`UV_HANDLE_CLOSING` or `UV_HANDLE_CLOSED`.

Fixes: https://github.com/libuv/libuv/issues/3503

show more ...


# d54c92e3 15-Feb-2022 Jameson Nash

win: fix style nits [NFC] (#3474)

Internal functions usually have a uv__ prefix.


# bcc4f8fd 28-May-2021 twosee

stream: introduce uv_try_write2 function

`uv_try_write2(stream, bufs, nbufs, send_handle)` acts like
`uv_try_write()` and extended write function for sending handles over a
pipe like

stream: introduce uv_try_write2 function

`uv_try_write2(stream, bufs, nbufs, send_handle)` acts like
`uv_try_write()` and extended write function for sending handles over a
pipe like `uv_write2`. It always returns `UV_EAGAIN` instead of
`UV_ENOSYS` on Windows so we can easily write cross-platform code
without special treatment.

PR-URL: https://github.com/libuv/libuv/pull/3183
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


# 06b73174 08-Jun-2020 Ben Noordhuis

unix,win: harmonize uv_read_start() error handling

The behavior of `uv_read_start()` when the handle is closing or already
busy reading wasn't consistent across platforms. Now it is.

unix,win: harmonize uv_read_start() error handling

The behavior of `uv_read_start()` when the handle is closing or already
busy reading wasn't consistent across platforms. Now it is.

Fixes: https://github.com/libuv/help/issues/137
PR-URL: https://github.com/libuv/libuv/pull/2795
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>

show more ...

# 958e85fb 28-Apr-2019 Santiago Gimeno

tcp: add uv_tcp_close_reset method

It resets a TCP connection by sending a RST packet. Due to some platform
inconsistencies, mixing of `uv_shutdown` and `uv_tcp_close_reset` calls
is

tcp: add uv_tcp_close_reset method

It resets a TCP connection by sending a RST packet. Due to some platform
inconsistencies, mixing of `uv_shutdown` and `uv_tcp_close_reset` calls
is not allowed.

Fixes: https://github.com/libuv/libuv/issues/1991
PR-URL: https://github.com/libuv/libuv/pull/2425
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# 619937c7 28-Jun-2018 Ben Noordhuis

unix,win: merge handle flags

Some long overdue refactoring that unifies more of the UNIX and Windows
backends.

PR-URL: https://github.com/libuv/libuv/pull/1904
Reviewed-By:

unix,win: merge handle flags

Some long overdue refactoring that unifies more of the UNIX and Windows
backends.

PR-URL: https://github.com/libuv/libuv/pull/1904
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 4e53af91 22-May-2018 Bert Belder

win,pipe: fix IPC pipe deadlock

This fixes a bug where IPC pipe communication would deadlock when both
ends of the pipe are written to simultaneously, and the kernel pipe
buffer has

win,pipe: fix IPC pipe deadlock

This fixes a bug where IPC pipe communication would deadlock when both
ends of the pipe are written to simultaneously, and the kernel pipe
buffer has already been filled up by earlier writes.

The root cause of the deadlock is that, while writes to an IPC pipe are
generally asynchronous, the IPC frame header is written synchronously.
So when both ends of the pipe are sending a frame header at the same
time, neither will read data off the pipe, causing both header writes
to block indefinitely.

Additionally, this patch somewhat reduces the spaghetti level in
win/pipe.c.

Fixes: https://github.com/libuv/libuv/issues/1099
Refs: https://github.com/nodejs/node/issues/7657
Refs: https://github.com/electron/electron/issues/10107
Refs: https://github.com/parcel-bundler/parcel/issues/637
Refs: https://github.com/parcel-bundler/parcel/issues/900
Refs: https://github.com/parcel-bundler/parcel/issues/1137
PR-URL: https://github.com/libuv/libuv/pull/1843
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

show more ...

# 4f60e0c1 23-May-2018 Bert Belder

win,pipe: refactor pipe read cancellation logic

* Don't silently ignore ERROR_OPERATION_ABORTED.

Code to silently ignore this error was added in c42a4ca, under the
false pre

win,pipe: refactor pipe read cancellation logic

* Don't silently ignore ERROR_OPERATION_ABORTED.

Code to silently ignore this error was added in c42a4ca, under the
false premise that this error is somehow equivalent to EINTR on posix
platforms. This isn't true; ERROR_OPERATION_ABORTED doesn't happen
unless the application explicitly aborts an I/O operation.

Silently ignoring this error elsewhere could potentially hide bugs,
hence libuv shouldn't do it. Instead, explicitly deal with it where
it is expected.

* Don't mark aborted reads as successful.

The worker thread used to call ReadFile() on synchronous pipes would
incorrectly mark cancelled read requests as successful, leading to
issues later on.

* Rely on main thread to restart aborted reads.

After a blocking ReadFile() call was cancelled, the worker thread
would previously attempt to restart it immediately, making
synchronization logic needlessly complex. Instead, we simply cancel
the operation, and leave it to the main loop to restart it if so
desired.

Since we now realy on the main thread to restart interrupted
ReadFile() calls, we can now have a single function interrupts a
synchronous read until the event loop restarts it again.

* Clean up uv__pipe_read_stop().

A single function to interrupt blocking reads also allows us to
remove weird logic in uv__pipe_read_stop() that quickly pauses and
unpauses a read operation in the hope of cancelling it.

* Assume CancelIo() and CancelSynchronousIo() are always available.

Since libuv doesn't support windows XP and Server 2003 any more, we
can assume that these APIs are always available, and do away with
branching around them.

PR-URL: https://github.com/libuv/libuv/pull/1843
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

show more ...

# 87df1448 14-Oct-2016 Ben Noordhuis

unix,windows: refactor request init logic

Fixes a TODO in src/threadpool.c. Updates the Windows code to drop the
unused `loop` parameter in calls to uv_req_init().

PR-URL: http

unix,windows: refactor request init logic

Fixes a TODO in src/threadpool.c. Updates the Windows code to drop the
unused `loop` parameter in calls to uv_req_init().

PR-URL: https://github.com/libuv/libuv/pull/1091
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.9.1, v1.9.0, v1.8.0, v1.7.5, v1.7.4, v1.7.3, v1.7.2, v1.7.1, v1.7.0, v1.6.1, v1.6.0, v1.5.0
# 073323ba 03-Mar-2015 TomCrypto

win: name all anonymous structs and unions

All the public structs and unions in the private fields in uv-win.h have
been named and all code accessing them updated, to comply to the C89

win: name all anonymous structs and unions

All the public structs and unions in the private fields in uv-win.h have
been named and all code accessing them updated, to comply to the C89
spec (which were previously causing warnings with the -pedantic flag).

PR-URL: https://github.com/libuv/libuv/pull/239
Reviewed-By: Andrius Bentkus <andrius.bentkus@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v0.10.36, v1.4.2, v0.10.35, v1.4.1, v0.10.34, v1.4.0, v1.3.0, v0.10.33, v1.2.1
# 55ea3712 12-Jan-2015 Bert Belder

win,tty: support uv_try_write

All windows console writes are synchronous anyway, so there's no reason
for uv_try_write() to do nothing.

PR: https://github.com/libuv/libuv/pull/1

win,tty: support uv_try_write

All windows console writes are synchronous anyway, so there's no reason
for uv_try_write() to do nothing.

PR: https://github.com/libuv/libuv/pull/127
Reviewed-by: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 9b8cef44 11-Jan-2015 Bert Belder

win,tcp: support uv_try_write

PR: https://github.com/libuv/libuv/pull/127
Reviewed-by: Saúl Ibarra Corretgé <saghul@gmail.com>

# e2f9b612 13-Jan-2015 Bert Belder

win,stream: start uv_try_write implementation

PR: https://github.com/libuv/libuv/pull/127
Reviewed-by: Saúl Ibarra Corretgé <saghul@gmail.com>

Revision tags: v1.2.0, v0.10.32, v1.1.0, v0.10.31, v1.0.2, v0.10.30, v1.0.1, v1.0.0, v0.10.29, v1.0.0-rc2, v1.0.0-rc1, v0.11.29, v0.11.28, v0.11.27, v0.10.28
# 837c62c7 15-Jul-2014 Jameson Nash

windows: make uv_read_stop immediately stop reading

This implements locking around the blocking call to ReadFile to get
around a Windows kernel bug where a blocking ReadFile operation on

windows: make uv_read_stop immediately stop reading

This implements locking around the blocking call to ReadFile to get
around a Windows kernel bug where a blocking ReadFile operation on a
stream can deadlock the thread. This allows uv_read_stop to immediately
cancel a pending IO operation, and allows uv_pipe_getsockname to
"pause" any pending read (from libuv) while it retrieves the
sockname information.

If unsupported by the OS (pre-Vista), this reverts to the old
(e.g. deadlock-prone) behavior

Closes #1313

show more ...

Revision tags: v0.11.26, v0.10.27, v0.11.25, v0.11.24, v0.11.23, v0.10.26, v0.11.22, v0.11.21, v0.11.20, v0.10.25, v0.11.19, v0.10.24, v0.11.18, v0.10.23, v0.10.22, v0.11.17
# b05a3ee4 22-Dec-2013 Fedor Indutny

pipe: allow queueing pending handles

Introduce `int uv_pipe_pending_count(uv_pipe_t*)` and
`uv_handle_type uv_pipe_pending_type(uv_pipe_t*)`. They should be
used in IPC pipe's read c

pipe: allow queueing pending handles

Introduce `int uv_pipe_pending_count(uv_pipe_t*)` and
`uv_handle_type uv_pipe_pending_type(uv_pipe_t*)`. They should be
used in IPC pipe's read cb to accept incoming handles:

int count = uv_pipe_pending_count(pipe);
int i;
for (i = 0; i < count; i++) {
uv_handle_type type = uv_pipe_pending_type(pipe);
/* ... */
uv_accept(...);
}

show more ...

# b2341e77 26-Feb-2014 Saúl Ibarra Corretgé

windows: fix typo

# b055538d 25-Feb-2014 Saúl Ibarra Corretgé

unix, windows: clarify what uv_stream_set_blocking does

Also replace the assert with an error on unix.

Revision tags: v0.10.21
# 17d60e3f 13-Dec-2013 Fedor Indutny

stream: allow multiple buffers for uv_try_write

Revision tags: v0.11.16, v0.10.20
# b5e7798a 06-Dec-2013 Fedor Indutny

stream: introduce uv_try_write(...)

`uv_try_write(stream, buf, size)` acts like `uv_write()`,
but without queueing actual write until UV_POLLOUT (or IOCP completion).
This is useful

stream: introduce uv_try_write(...)

`uv_try_write(stream, buf, size)` acts like `uv_write()`,
but without queueing actual write until UV_POLLOUT (or IOCP completion).
This is useful for doing writes using on-stack `uv_write_t` requests.

fix #1025

show more ...

Revision tags: v0.11.15, v0.10.19, v0.11.14, v0.10.18
# 7c7717c6 25-Sep-2013 Ben Noordhuis

windows: remove duplicate check in stream.c

Fixes #937.

Revision tags: v0.10.17, v0.10.16, v0.11.13, v0.11.12
# 779b8d81 31-Aug-2013 Ben Noordhuis

include: make uv_write{2} const correct

12