aboutsummaryrefslogtreecommitdiff
path: root/tun/tun.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-03-21 14:43:04 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-21 14:45:41 -0600
commit6440f010eec82abb9c999771a8f493af44c6b937 (patch)
tree187207b768cb2bb477879a1abfad8b732bbece45 /tun/tun.go
parent49ea0c9b1aca8662c2e520d84f7eed3019f2697a (diff)
downloadwireguard-go-6440f010eec82abb9c999771a8f493af44c6b937.tar.gz
wireguard-go-6440f010eec82abb9c999771a8f493af44c6b937.zip
receive: implement flush semantics
Diffstat (limited to 'tun/tun.go')
-rw-r--r--tun/tun.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/tun/tun.go b/tun/tun.go
index c4b6cac..12febb8 100644
--- a/tun/tun.go
+++ b/tun/tun.go
@@ -21,6 +21,7 @@ type TUNDevice interface {
File() *os.File // returns the file descriptor of the device
Read([]byte, int) (int, error) // read a packet from the device (without any additional headers)
Write([]byte, int) (int, error) // writes a packet to the device (without any additional headers)
+ Flush() error // flush all previous writes to the device
MTU() (int, error) // returns the MTU of the device
Name() (string, error) // fetches and returns the current name
Events() chan TUNEvent // returns a constant channel of events related to the device