github.com/MerlinKodo/sing-shadowsocks2@v0.1.6/internal/shadowio/waiter.go (about)

     1  package shadowio
     2  
     3  import (
     4  	"io"
     5  	"net"
     6  )
     7  
     8  type WaitRead interface {
     9  	WaitRead() (data []byte, put func(), err error)
    10  }
    11  
    12  type WaitReadReader interface {
    13  	io.Reader
    14  	WaitRead
    15  }
    16  
    17  type WaitReadFrom interface {
    18  	WaitReadFrom() (data []byte, put func(), addr net.Addr, err error)
    19  }