Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeekableConn ¶
type PeekableConn interface { net.Conn // Peek returns a preview of n bytes of the connection without consuming them. // Once this connection has been read from, peeking is no longer permitted and // will return an error. Peek(n int) ([]byte, error) }
PeekableConn is an interface that is a superset of the net.Conn interface, additionally allowing a connection's bytes to be inspected without being consumed.
func NewPeekableConn ¶
func NewPeekableConn(conn net.Conn) PeekableConn
NewPeekableConn returns a PeekableConn whose bytes can be inspected without being consumed.
Click to show internal directories.
Click to hide internal directories.