mirror of
https://gitee.com/konyshe/goodlink.git
synced 2025-10-01 23:12:11 +08:00
18 lines
341 B
Go
18 lines
341 B
Go
package netstack
|
|
|
|
import (
|
|
"gvisor.dev/gvisor/pkg/tcpip/adapters/gonet"
|
|
"gvisor.dev/gvisor/pkg/tcpip/stack"
|
|
)
|
|
|
|
// udpConn 实现了UDP连接接口
|
|
type udpConn struct {
|
|
*gonet.UDPConn
|
|
id stack.TransportEndpointID
|
|
}
|
|
|
|
// ID 返回连接的传输端点ID
|
|
func (c *udpConn) ID() *stack.TransportEndpointID {
|
|
return &c.id
|
|
}
|