5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-15 17:50:28 +00:00
yggdrasil-go/src/yggdrasil/adapter.go

17 lines
395 B
Go
Raw Normal View History

2018-12-14 18:29:00 +00:00
package yggdrasil
// Defines the minimum required struct members for an adapter type (this is
// now the base type for tunAdapter in tun.go)
type Adapter struct {
core *Core
send chan<- []byte
recv <-chan []byte
}
// Initialises the adapter.
func (adapter *Adapter) init(core *Core, send chan<- []byte, recv <-chan []byte) {
adapter.core = core
adapter.send = send
adapter.recv = recv
}