Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFixedFrameLengthMismatch = errors.New("read frame length mismatch")
View Source
var ErrReadFrameLengthShort = errors.New("read frame length too short")
View Source
var ErrShutdown = fmt.Errorf("frameconn: shutting down")
Functions ¶
func IsPublicFrameType ¶
The 4 MSBs of ft are reserved for frameconn.
func PrometheusRegister ¶
func PrometheusRegister(registry prometheus.Registerer) error
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func Wrap ¶
func Wrap(nc timeoutconn.Conn) *Conn
func (*Conn) ReadFrame ¶
ReadFrame reads a frame from the connection.
Due to an internal optimization (Readv, specifically), it is not guaranteed that a single call to WriteFrame unblocks a pending ReadFrame on an otherwise idle (empty) connection. The only way to guarantee that all previously written frames can reach the peer's layers on top of frameconn is to send an empty frame (no payload) and to ignore empty frames on the receiving side.
func (*Conn) ResetWriteTimeout ¶ added in v0.1.1
type Frame ¶
type Frame struct { Header FrameHeader Buffer Buffer }
type FrameHeader ¶
func (*FrameHeader) Unmarshal ¶
func (f *FrameHeader) Unmarshal(buf []byte)
Click to show internal directories.
Click to hide internal directories.