Documentation ¶
Index ¶
Constants ¶
View Source
const BufSize = 20 * 1024
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Allocator ¶ added in v0.9.0
type Allocator struct {
// contains filtered or unexported fields
}
Allocator for incoming frames, optimized to prevent overwriting after zeroing
func NewAllocator ¶ added in v0.9.0
func NewAllocator() *Allocator
NewAllocator initiates a []byte allocator for frames less than 65536 bytes, the waste(memory fragmentation) of space allocation is guaranteed to be no more than 50%.
type Interface ¶ added in v0.9.0
type Interface struct { io.ReadWriteCloser ReadCh chan []byte StopCh chan bool }
func OpenTunDevice ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.