Something went wrong. Try again.
sloproxy
Something went wrong. Try again.
573 B · 32 lines
Go
at main
123456789101112131415161718192021222324252627282930313233package api
import ( "bufio" "crypto/tls" "net")
type bufferedConn struct { net.Conn reader *bufio.Reader}
func (c *bufferedConn) Read(p []byte) (int, error) { if c == nil { return 0, net.ErrClosed } if c.reader == nil { return c.Conn.Read(p) } return c.reader.Read(p)}
func (c *bufferedConn) ConnectionState() tls.ConnectionState { if c == nil || c.Conn == nil { return tls.ConnectionState{} } if stater, ok := c.Conn.(interface{ ConnectionState() tls.ConnectionState }); ok { return stater.ConnectionState() } return tls.ConnectionState{}}