mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-12-02 14:35:22 +00:00
19 lines
493 B
Go
19 lines
493 B
Go
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
|
|
reconfigure chan chan error
|
|
}
|
|
|
|
// Initialises the adapter.
|
|
func (adapter *Adapter) init(core *Core, send chan<- []byte, recv <-chan []byte) {
|
|
adapter.core = core
|
|
adapter.send = send
|
|
adapter.recv = recv
|
|
adapter.reconfigure = make(chan chan error, 1)
|
|
}
|