• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

HarryR / nt365 / 26714000618
44%

Build:
DEFAULT BRANCH: main
Ran 31 May 2026 01:36PM UTC
Jobs 1
Files 577
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 May 2026 01:28PM UTC coverage: 41.97% (-0.05%) from 42.024%
26714000618

push

github

HarryR
ws2_32: WSAIoctl + real TCP keepalive via AFD (and fix SO_KEEPALIVE)

Add ws2_32!WSAIoctl (synchronous-only) and wire TCP keepalive end to end so
socket.ioctl(SIO_KEEPALIVE_VALS) and setsockopt(SO_KEEPALIVE) actually
enable/disable keepalive on the connection -- the last Tier-1 symbol for
headless CPython 2.7.

There is no WSH helper DLL (wshtcpip) in MicroNT, so the option-setting NT
normally does in user mode is relocated into AFD:

  ws2_32 WSAIoctl / setsockopt(SO_KEEPALIVE)
    -> IOCTL_AFD_SET_INFORMATION (new AFD_KEEPALIVE info code)
       -> AfdSetInformation: store on endpoint; if connected,
          AfdSetKeepAliveOnConnection() issues IOCTL_TCP_SET_INFORMATION_EX
          (TCP_SOCKET_KEEPALIVE) on the TDI connection
       -> keepalive set before connect is applied at connect (CONNECT.C);
          the flag lands on the connection object and is inherited by the TCB

TCP is unchanged -- TCPSetInformationEx/TdiSetInformationEx already set the
KEEPALIVE flag. WSAIoctl is synchronous-only: SIO_RCVALL, the extension-
function pointer, and any overlapped request return WSAEOPNOTSUPP so this one
symbol cannot pull in the IOCP/mswsock surface.

tcp_keepalive.onoff is honored for real; keepalivetime/keepaliveinterval are
accepted but ignored -- this TCP is NT4-era with global keepalive timers.
Per-socket timers (the Win2000 SIO_KEEPALIVE_VALS option) are future work (#8).

SO_KEEPALIVE setsockopt/getsockopt previously fell to the absent helper-DLL
path (WSAENOPROTOOPT); both now route through AFD_KEEPALIVE and round-trip a
cached socket->KeepAlive.

Lua nt.net.afd selftests drive the kernel path both connected and pre-connect;
coverage confirms AfdSetKeepAliveOnConnection and the TCP enable/disable
branches execute.

Closes #7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

23 of 26 new or added lines in 2 files covered. (88.46%)

200 existing lines in 19 files now uncovered.

47864 of 114043 relevant lines covered (41.97%)

2682.3 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
83.08
0.17% src/NT/PRIVATE/NTOS/AFD/MISC.C

Coverage Regressions

Lines Coverage ∆ File
82
66.47
-0.13% src/NT/PRIVATE/NTOS/INIT/INIT.C
24
42.38
-15.89% src/NT/PRIVATE/NTOS/MM/WSMANAGE.C
14
50.37
-3.46% src/NT/PRIVATE/NTOS/CACHE/COPYSUP.C
14
44.96
-0.9% src/NT/PRIVATE/NTOS/NTFS/CREATE.C
11
39.75
-0.81% src/NT/PRIVATE/NTOS/TDI/TCPIP/IP/ARP.C
10
53.13
-0.73% src/NT/PRIVATE/NTOS/IO/IOSUBS.C
8
45.45
-4.28% src/NT/PRIVATE/NTOS/AFD/RECVDG.C
6
17.36
-4.96% src/NT/PRIVATE/NTOS/IO/ERRORLOG.C
5
61.22
-1.46% src/NT/PRIVATE/NTOS/KE/WAIT.C
5
45.93
-1.13% src/NT/PRIVATE/NTOS/MM/WSLIST.C
4
48.25
-2.8% src/NT/PRIVATE/NTOS/MM/WSTREE.C
3
68.22
-2.8% src/NT/PRIVATE/NTOS/KE/THREDSUP.C
3
23.08
-23.08% src/NT/PRIVATE/NTOS/NTHALS/HAL/I386/irql.c
2
55.5
-0.82% src/NT/PRIVATE/NTOS/AFD/SEND.C
2
91.8
-3.28% src/NT/PRIVATE/NTOS/KE/DPCSUP.C
2
31.02
-0.6% src/NT/PRIVATE/NTOS/MM/PROTECT.C
2
72.71
-0.35% src/NT/PRIVATE/NTOS/NTFS/LOGSUP.C
2
63.21
-0.17% src/NT/PRIVATE/NTOS/NTFS/STRUCSUP.C
1
83.08
0.17% src/NT/PRIVATE/NTOS/AFD/MISC.C
Jobs
ID Job ID Ran Files Coverage
1 26714000618.1 31 May 2026 01:36PM UTC 577
41.97
GitHub Action Run
Source Files on build 26714000618
  • Tree
  • List 577
  • Changed 27
  • Source Changed 3
  • Coverage Changed 27
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26714000618
  • dd63aca2 on github
  • Prev Build on main (#26681931781)
  • Next Build on main (#26725532291)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc