Commit bdf8889
v2.5.6: CosmoKvHttp client supports Endpoint=unix:///path UDS connections
Co-located clients (mail-server containers, CLI tools running on the
same host as cosmokvd) can now bypass TCP loopback by setting their
connection string to `Endpoint=unix:///var/run/cosmokvd.sock;...`.
Saves the per-call socket-buffer copies + TCP framing — typically
20-40% lower latency on local IPC.
Implementation: CosmoKvHttpConnection inspects the Endpoint prefix at
construction time. If it starts with `unix://`, a SocketsHttpHandler
with a ConnectCallback is wired up, returning a NetworkStream over a
freshly-connected UnixDomainSocketEndPoint. HttpClient gets a sentinel
`http://cosmokvd-uds/` BaseAddress (the host portion is irrelevant
because ConnectCallback short-circuits DNS/TCP).
Backwards compatible — TCP endpoints work exactly as before.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1d38ce3 commit bdf8889
2 files changed
Lines changed: 43 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
51 | 92 | | |
52 | 93 | | |
53 | 94 | | |
54 | 95 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 96 | | |
59 | 97 | | |
60 | 98 | | |
| |||
0 commit comments