mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-12-12 09:23:58 +08:00
wrap WriteTo
This commit is contained in:
@@ -307,3 +307,8 @@ type PacketConnTimeWrapper struct {
|
||||
lastUsedTime time.Time
|
||||
isMainConn bool
|
||||
}
|
||||
|
||||
func (c *PacketConnTimeWrapper) WriteTo(b []byte, addr net.Addr) (n int, err error) {
|
||||
c.lastUsedTime = time.Now()
|
||||
return c.PacketConn.WriteTo(b, addr)
|
||||
}
|
||||
Reference in New Issue
Block a user