mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-16 05:42:23 +08:00
Fix deadline usage on websocket conn
This commit is contained in:
parent
87cd925144
commit
9df96ac7f1
|
@ -69,6 +69,14 @@ func (c *WebsocketConn) SetDeadline(t time.Time) error {
|
||||||
return os.ErrInvalid
|
return os.ErrInvalid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *WebsocketConn) SetReadDeadline(t time.Time) error {
|
||||||
|
return os.ErrInvalid
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *WebsocketConn) SetWriteDeadline(t time.Time) error {
|
||||||
|
return os.ErrInvalid
|
||||||
|
}
|
||||||
|
|
||||||
func (c *WebsocketConn) Upstream() any {
|
func (c *WebsocketConn) Upstream() any {
|
||||||
return c.Conn.NetConn()
|
return c.Conn.NetConn()
|
||||||
}
|
}
|
||||||
|
@ -195,24 +203,15 @@ func (c *EarlyWebsocketConn) RemoteAddr() net.Addr {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *EarlyWebsocketConn) SetDeadline(t time.Time) error {
|
func (c *EarlyWebsocketConn) SetDeadline(t time.Time) error {
|
||||||
if c.conn == nil {
|
return os.ErrInvalid
|
||||||
return os.ErrInvalid
|
|
||||||
}
|
|
||||||
return c.conn.SetDeadline(t)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *EarlyWebsocketConn) SetReadDeadline(t time.Time) error {
|
func (c *EarlyWebsocketConn) SetReadDeadline(t time.Time) error {
|
||||||
if c.conn == nil {
|
return os.ErrInvalid
|
||||||
return os.ErrInvalid
|
|
||||||
}
|
|
||||||
return c.conn.SetReadDeadline(t)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *EarlyWebsocketConn) SetWriteDeadline(t time.Time) error {
|
func (c *EarlyWebsocketConn) SetWriteDeadline(t time.Time) error {
|
||||||
if c.conn == nil {
|
return os.ErrInvalid
|
||||||
return os.ErrInvalid
|
|
||||||
}
|
|
||||||
return c.conn.SetWriteDeadline(t)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *EarlyWebsocketConn) Upstream() any {
|
func (c *EarlyWebsocketConn) Upstream() any {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user