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.
Click to show internal directories.
Click to hide internal directories.