MCPcopy
hub / github.com/WireGuard/wireguard-go / Read

Method Read

tun/tun.go:29–29  ·  view source on GitHub ↗

Read one or more packets from the Device (without any additional headers). On a successful read it returns the number of packets read, and sets packet lengths within the sizes slice. len(sizes) must be >= len(bufs). A nonzero offset can be used to instruct the Device on where to begin reading into e

(bufs [][]byte, sizes []int, offset int)

Source from the content-addressed store, hash-verified

27 // A nonzero offset can be used to instruct the Device on where to begin
28 // reading into each element of the bufs slice.
29 Read(bufs [][]byte, sizes []int, offset int) (n int, err error)
30
31 // Write one or more packets to the device (without any additional headers).
32 // On a successful write it returns the number of packets written. A nonzero

Callers 15

TestChecksumFunction · 0.65
TestPseudoHeaderChecksumFunction · 0.65
BenchmarkChecksumFunction · 0.65
ReadMethod · 0.65
routineRouteListenerMethod · 0.65
ReadMethod · 0.65
routineRouteListenerMethod · 0.65
ReadMethod · 0.65
routineRouteListenerMethod · 0.65
ReadMethod · 0.65
ReadMethod · 0.65
WriteNotifyMethod · 0.65

Implementers 4

NativeTuntun/tun_linux.go
netTuntun/netstack/tun.go
chTuntun/tuntest/tuntest.go
fakeTUNDeviceSizeddevice/device_test.go

Calls

no outgoing calls

Tested by 14

TestChecksumFunction · 0.52
TestPseudoHeaderChecksumFunction · 0.52
BenchmarkChecksumFunction · 0.52
genConfigsFunction · 0.52
TestTrieRandomFunction · 0.52
CreateDummyEndpointFunction · 0.52
benchmarkTrieFunction · 0.52
TestPingPongFunction · 0.52
TestReadTimeoutFunction · 0.52
ensureEOFOnCloseFunction · 0.52
TestCloseWriteEOFFunction · 0.52
TestTimeoutPendingReadFunction · 0.52