mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-12-18 05:04:36 +03:00
wrap WriteTo
This commit is contained in:
@@ -307,3 +307,8 @@ type PacketConnTimeWrapper struct {
|
|||||||
lastUsedTime time.Time
|
lastUsedTime time.Time
|
||||||
isMainConn bool
|
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