receive: implement flush semantics
This commit is contained in:
parent
49ea0c9b1a
commit
6440f010ee
12 changed files with 165 additions and 116 deletions
|
|
@ -318,6 +318,11 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
|
|||
return tun.tunFile.Write(buff)
|
||||
}
|
||||
|
||||
func (tun *NativeTun) Flush() error {
|
||||
//TODO: can flushing be implemented by buffering and using sendmmsg?
|
||||
return nil
|
||||
}
|
||||
|
||||
func (tun *NativeTun) Read(buff []byte, offset int) (int, error) {
|
||||
select {
|
||||
case err := <-tun.errors:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue