Prepare deadline interface

This commit is contained in:
世界
2023-04-19 21:48:54 +08:00
parent a5322850b3
commit 4382093868
14 changed files with 86 additions and 36 deletions

View File

@@ -132,6 +132,10 @@ func (c *Conn) Write(b []byte) (n int, err error) {
return c.protocolConn.Write(b)
}
func (c *Conn) NeedAdditionalReadDeadline() bool {
return true
}
func (c *Conn) Upstream() any {
return c.Conn
}
@@ -212,6 +216,10 @@ func (c *PacketConn) FrontHeadroom() int {
return 2
}
func (c *PacketConn) NeedAdditionalReadDeadline() bool {
return true
}
func (c *PacketConn) Upstream() any {
return c.Conn
}