mirror of
https://github.com/wzshiming/tun.git
synced 2025-12-24 13:18:15 +08:00
14 lines
359 B
Go
14 lines
359 B
Go
package netstack
|
|
|
|
import (
|
|
"gvisor.dev/gvisor/pkg/tcpip/adapters/gonet"
|
|
"gvisor.dev/gvisor/pkg/tcpip/stack"
|
|
)
|
|
|
|
// Handler is a TCP/UDP connection handler that implements
|
|
// HandleTCPConn and HandleUDPConn methods.
|
|
type Handler interface {
|
|
HandleTCPConn(stack.TransportEndpointID, *gonet.TCPConn)
|
|
HandleUDPConn(stack.TransportEndpointID, *gonet.UDPConn)
|
|
}
|