MCPcopy
hub / github.com/caddyserver/caddy / Read

Method Read

modules/caddyhttp/reverseproxy/httptransport.go:838–848  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

836}
837
838func (c *tcpRWTimeoutConn) Read(b []byte) (int, error) {
839 if c.readTimeout > 0 {
840 err := c.TCPConn.SetReadDeadline(time.Now().Add(c.readTimeout))
841 if err != nil {
842 if ce := c.logger.Check(zapcore.ErrorLevel, "failed to set read deadline"); ce != nil {
843 ce.Write(zap.Error(err))
844 }
845 }
846 }
847 return c.TCPConn.Read(b)
848}
849
850func (c *tcpRWTimeoutConn) Write(b []byte) (int, error) {
851 if c.writeTimeout > 0 {

Callers

nothing calls this directly

Calls 4

AddMethod · 0.45
CheckMethod · 0.45
WriteMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected