MCPcopy Create free account
hub / github.com/encodeous/nylon / BatchSize

Method BatchSize

polyamide/device/device.go:340–347  ·  view source on GitHub ↗

BatchSize returns the BatchSize for the device as a whole which is the max of the bind batch size and the tun batch size. The batch size reported by device is the size used to construct memory pools, and is the allowed batch size for the lifetime of the device.

()

Source from the content-addressed store, hash-verified

338// is the size used to construct memory pools, and is the allowed batch size for
339// the lifetime of the device.
340func (device *Device) BatchSize() int {
341 size := device.net.bind.BatchSize()
342 dSize := device.tun.device.BatchSize()
343 if size < dSize {
344 size = dSize
345 }
346 return size
347}
348
349func (device *Device) LookupPeer(pk NoisePublicKey) *Peer {
350 device.peers.RLock()

Callers 3

TestBatchSizeFunction · 0.95
PopulatePoolsMethod · 0.95
RoutineReadFromTUNMethod · 0.95

Implementers 4

NativeTunpolyamide/tun/tun_linux.go
netTunpolyamide/tun/netstack/tun.go
chTunpolyamide/tun/tuntest/tuntest.go
fakeTUNDeviceSizedpolyamide/device/device_test.go

Calls 1

BatchSizeMethod · 0.65

Tested by 1

TestBatchSizeFunction · 0.76