Add some simple functions for Swift bindings (iOS)

This commit is contained in:
Neil Alexander 2019-01-01 23:25:20 +00:00
parent d08a3c6643
commit 53aeca8fa2
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 113 additions and 64 deletions

View file

@ -1,17 +1,8 @@
package yggdrasil
// Defines the minimum required functions for an adapter type.
type AdapterInterface interface {
init(core *Core, send chan<- []byte, recv <-chan []byte)
read() error
write() error
close() error
}
// Defines the minimum required struct members for an adapter type (this is
// now the base type for tunAdapter in tun.go)
type Adapter struct {
AdapterInterface
core *Core
send chan<- []byte
recv <-chan []byte