Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-receipts/blob/main/audit/tls/omega-mv/bench/drivers/tls-nodelay.diff # aien-receipts Append-only AIEN verification receipts, indexed by repository and exact source commit. Read verdicts, signatures and retained logs before making a claim. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-receipts / audit / tls / omega-mv / bench / drivers / tls-nodelay.diff` 27 lines ยท 988 bytes Raw Blame History 1 diff --git a/om/tls/tls.om b/om/tls/tls.om 2 index `0cc11699`..`c08e42a8` 100644 3 --- a/om/tls/tls.om 4 +++ b/om/tls/tls.om 5 @@ -2350,7 +2350,11 @@ end 6 ret dns_parse part r 0 ulong n q ip 7 end 8 9 -note TCP connect to ip:port, non-blocking with a 10 s limit; returns fd (>= 0) or minus a code 10 +note TCP connect to ip:port, non-blocking with a 10 s limit; returns fd (>= 0) or minus a code. 11 +note TCP_NODELAY is set: TLS hands the kernel whole records, and with Nagle on, the first request 12 +note record waits behind the un-acknowledged Finished for the peer's delayed ACK (about 40 ms per 13 +note connection on Linux loopback, measured in the TlsProof benchmark). A refusal is ignored: it 14 +note only costs latency. 15 fn tcp_open4 ip view uchar * port ulong to long 16 sa = new uchar 16 0 17 tcp_sa sa ip port 18 @@ -2359,6 +2363,9 @@ if lt fd 0 19 ret neg long TLECONN 20 end 21 f = int fd 22 +one = new uchar 4 0 23 +put one 0 1 24 +x = sockopt f 6 1 one 0 4 25 r = connect f sa 0 16 26 if eq r -115 27 w = waitio f 4 `10000000000`