diff --git a/shadowaead/service.go b/shadowaead/service.go index 693c218..64091ba 100644 --- a/shadowaead/service.go +++ b/shadowaead/service.go @@ -176,6 +176,10 @@ func (c *serverConn) writeResponse(payload []byte) (n int, err error) { return } +func (c *serverConn) Read(b []byte) (n int, err error) { + return c.reader.Read(b) +} + func (c *serverConn) Write(p []byte) (n int, err error) { if c.writer != nil { return c.writer.Write(p) diff --git a/shadowaead_2022/service.go b/shadowaead_2022/service.go index 582c0e7..bec8e45 100644 --- a/shadowaead_2022/service.go +++ b/shadowaead_2022/service.go @@ -319,6 +319,10 @@ func (c *serverConn) writeResponse(payload []byte) (n int, err error) { return } +func (c *serverConn) Read(b []byte) (n int, err error) { + return c.reader.Read(b) +} + func (c *serverConn) Write(p []byte) (n int, err error) { if c.writer != nil { return c.writer.Write(p)