10 Commits
Author SHA1 Message Date
mirkobrombin 4b89a48e1e fix: bind completion ports late and honor pipe read modes
Assisted-by: Claude Code:claude-opus-5-5
AI-Scope: named pipe completion port lookup, read mode state and tests
2026-11-01 21:00:40 +00:00
Raymond Bennett df78d476dc feat: poll sockets through the AFD device, as mio and wepoll do
mio, the I/O layer under Tokio, waits for sockets by opening \Device\Afd
with NtCreateFile and issuing IOCTL_AFD_POLL through NtDeviceIoControlFile,
with the completions delivered to an I/O completion port; wepoll and libuv
do the same. Every Tokio program that touches the network stopped there:
xh, Deno's fetch, Bun.

An AFD endpoint is now a handle that can join a completion port. A poll
reads AFD_POLL_INFO (the timeout, the sockets and the events wanted), waits
in the reactor on the sockets' host descriptors, and finishes as overlapped
I/O does: the output records with the events that occurred (receive,
expedited, send, disconnect, abort, local close, accept, connect failure),
the IO_STATUS_BLOCK, the event, and a packet carrying the APC context. The
native cancels end pending polls as cancelled. WSAIoctl answers
SIO_BASE_HANDLE and the SIO_BSP_HANDLE codes with the socket itself, since
no layered provider sits on it. The structures and codes are the ones those
open-source projects define; Microsoft does not document this interface.

Assisted-by: Claude Code:claude-opus-5-5
AI-Scope: the AFD endpoint, its poll and cancellation, and the base-handle codes
(cherry picked from commit 660a20304054e00ab94afef0322f9dbd0a8cbb8f)
2026-10-30 08:25:32 -07:00
Raymond Bennett a0501ba49c fix: read SetFileCompletionNotificationModes' flags as the UCHAR they are
Only the low byte of the flags argument is the caller's; the rest of the
register can hold anything, and mio's call arrived as 0x102 and was refused,
so every socket it registered failed.

Assisted-by: Claude Code:claude-opus-5-5
AI-Scope: the change
(cherry picked from commit 819372b516072d07ef0442c0fad7933874b20ad4)
2026-10-28 23:14:32 -07:00
mirkobrombin f9e7ce0de4 feat: impersonate the client of a named pipe 2026-10-27 17:53:58 +00:00
mirkobrombin 44a593867c feat: run an SSH client's terminal and file transfer windows 2026-10-26 23:13:38 +00:00
Mirko Brombin 8cdec79f0e feat: answer NtReadFile, NtWriteFile, FSCTL_PIPE_LISTEN and NtCancelIoFile on pipes with the caller's event and IO_STATUS_BLOCK 2026-09-21 06:06:44 +00:00
Mirko Brombin bc97c80eed feat: add sleep on the reactor's descriptors and a wake event when idle, and poll other processes' frames only for windows they draw into 2026-09-20 20:45:03 +02:00
Mirko Brombin ab62d80bea feat: serve leaf API calls without stopping the guest, run blocking Vulkan calls off the scheduler and keep input in order 2026-09-04 04:31:00 +02:00
Mirko Brombin ead54d6b10 feat: run Google Chrome with NT object queries, COM apartments, file completion ports and SDDL descriptors 2026-09-03 21:44:05 +02:00
Mirko Brombin 66087052d8 feat: run Chromium's helper processes with DirectWrite, named pipes, jobs, inherited handles and shared sections 2026-09-03 06:06:54 +02:00