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

starwing / znet
95%

Build:
DEFAULT BRANCH: master
Repo Added 31 Oct 2026 04:30PM UTC
Token JxQl762i6XYgjPjLh0eFBpoXMikbZUj9o regen
Build 8 Last
Files 2
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

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
Sync Branches
  • master

01 Nov 2026 03:13AM UTC coverage: 94.657% (-0.005%) from 94.662%
41268327138

push

github

starwing
api: drop zn_initialize/zn_deinitialize, init Winsock lazily

The global pair existed only for WSAStartup, and it was the wrong shape: it
also carried the GetQueuedCompletionStatusEx lookup, so an embedder that
already owned Winsock had to call it anyway or silently lose the batched
poll.  XP is not worth keeping either: MSVC and MinGW-w64 both default
_WIN32_WINNT to the newest version (sdkddkver.h: "default to most current"),
so "no version macro" already means Vista+ -- and an explicit
_WIN32_WINNT=0x0501 does not even compile (InetPtonA/InetNtopA sit behind
NTDDI_LONGHORN).

The first zn_newstate() now runs WSAStartup through
INIT_ONCE/InitOnceExecuteOnce: statically initialized, waiters block instead
of polling, exactly once per process.  The callback always returns TRUE and
latches the result in znP_wsaok, so a failed init is not retried on every
state.  Nothing calls WSACleanup (libuv's model: the process exit releases
it), and a failed init makes zn_newstate() return NULL instead of abort().

With XP gone, reaching GetQueuedCompletionStatusEx through GetProcAddress
buys nothing, so the manual typedef, the function pointer and the
one-packet GetQueuedCompletionStatus fallback go too; znB_read calls it
directly and an untested fallback path disappears with them (this also
clears the 80-column typedef exception in notes/refine.md).

Call sites: znet.hpp loses ZSummerEnvironment/ZNPP_DEFINE_ENV, zn_lua.c
loses the module __gc, examples, bench and tests lose their calls.
README.md, README.zh.md and the notes describe the new lifetime.

Verified with notes/gate.sh (macOS kqueue+select, Linux epoll+select,
Windows IOCP cl /W4 /WX), just check-c89, just check-cpp03, just
test-lua, and MinGW-w64 GCC 13.2.0 (C99 / C89 -pedantic-errors / C++03
-pedantic-errors / C++11 all compile; example runs to "exit...").

824 of 927 branches covered (88.89%)

Branch coverage included in aggregate %.

1231 of 1244 relevant lines covered (98.95%)

41172.91 hits per line

Relevant lines Covered
Build:
Build:
1244 RELEVANT LINES 1231 COVERED LINES
41172.91 HITS PER LINE
Source Files on master
  • Tree
  • List 2
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
41268327138 master api: drop zn_initialize/zn_deinitialize, init Winsock lazily The global pair existed only for WSAStartup, and it was the wrong shape: it also carried the GetQueuedCompletionStatusEx lookup, so an embedder that already owned Winsock had to call it... push 01 Nov 2026 03:14AM UTC starwing github
94.66
41265075565 master docs: C3 measures "signature must not wrap", not "<80 columns" The requirement is that clang-format keeps the signature on one line; the line limit is <=80 columns including the return type and ZN_API. A definition also carries " {" (two more co... push 01 Nov 2026 02:25AM UTC starwing github
94.66
41221342373 master ci: keep the macOS image's Homebrew versions while installing lcov/coveralls push 31 Oct 2026 04:47PM UTC starwing github
94.58
41221096217 master ci: build lcov 2.5 from source and honour skip markers push 31 Oct 2026 04:45PM UTC starwing github
95.2
41220756027 master ci: note ubuntu-24.04's bogus lcov --list rates push 31 Oct 2026 04:40PM UTC starwing github
95.05
41220495830 master lua: initialize the udp receive buffer lzn_Udp.recv is a zn_Buffer, but Ludp_new() never called zn_initbuffer, so the buff/size/bc fields held whatever the Lua userdata allocation contained. zn_prepbuffsize() in receivefrom() then realloc'd that ... push 31 Oct 2026 04:37PM UTC starwing github
95.05
41220180972 master ci: bump checkout/cache to Node 24 majors push 31 Oct 2026 04:33PM UTC starwing github
95.05
41219943832 master ci: check on Windows/Linux/macOS, coverage to Coveralls push 31 Oct 2026 04:30PM UTC starwing github
95.05
See All Builds (8)

Badge your Repo: znet

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

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

Refresh
  • Settings
  • Repo on GitHub
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