vsockpeer

command
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Command vsockpeer is the GUEST half of the vsock proxy throughput bench (hack/vsockbench). It runs inside the container and serves a unix socket — the same shape as buildkitd behind ExposeUnix — so the host can push and pull bulk bytes through the production proxy path: host unix socket → bidiPipe → vz vsock → guest agent bidiCopy → this socket.

Protocol per connection (client speaks first): one mode byte, then a big-endian uint64 byte count.

'R' — RECV: the peer SOURCES count bytes to the client, then half-closes.
'S' — SEND: the peer SINKS count bytes from the client, then writes one
      ack byte so the client's clock stops only once every byte arrived.

Both loops use a 1 MiB buffer with the ReaderFrom/WriterTo fast paths hidden, so this end is never the bottleneck being measured.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL