This commit is contained in:
JackDoan
2026-05-14 11:45:45 -05:00
parent d1a24540e6
commit 7d61303e81

View File

@@ -31,9 +31,10 @@ type Capabilities struct {
type Queue interface { type Queue interface {
io.Closer io.Closer
// Read will read at least 1 packet from the tun (up to len(p)) // Read will read at least 1 packet from the tun (up to len(p)).
// mem will be used to provide the backing for each of p[n].Bytes // mem will be used to provide the backing for each of p[n].Bytes.
// Returns the number of packets actually read, or error // Callers should size mem and p to avoid exhausting mem before p.
// Returns the number of packets actually read, or error.
Read(p []wire.TunPacket, mem []byte) (int, error) Read(p []wire.TunPacket, mem []byte) (int, error)
// Write emits a single packet on the plaintext (outside→inside) // Write emits a single packet on the plaintext (outside→inside)