mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
- scr_net: scr_net_sock_writev_native sends ordered slices with one sendmsg when the bytes would go out immediately (plain socket, nothing buffered); every other state takes the per-slice write_raw path, so buffering, transports, and teardown are unchanged. - scr_http: end(data) before the head, write() before the head, chunk framing, and the final chunk now leave as one write (head + body + framing), as Node does. A typical response was a head segment plus a body segment; it is now one segment and one syscall. - scr_net: stop reading after a short read (libuv UV_HANDLE_READ_PARTIAL); the level-triggered poller reports later bytes or EOF. Removes the EAGAIN read per request (0.7 per request on http-api). TLS transports keep draining. - scr_http: Date header formatted once per second; head built in one pass without snprintf; request headers parsed with geometric array growth and one shared string when the name is already lowercase. The bytes on the wire are unchanged (the runner digests every response against Node).