Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrProtocolViolation ¶
type ErrProtocolViolation struct {
Err error
}
func (*ErrProtocolViolation) Error ¶
func (e *ErrProtocolViolation) Error() string
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is a line reader that supports the zlib on/off switching procedure required by hub-to-client and client-to-client connections.
func (*Reader) EnableZlib ¶ added in v0.5.1
EnableZlib activates zlib inflating.
func (*Reader) OnLine ¶
OnLine registers a hook that is called each time a raw protocol line is read from the connection. The buffer will contain a delimiter and is in the connection encoding. The function may return (false, nil) to ignore the message.
This method is not concurrent-safe.
type Writer ¶
type Writer struct { // Timeout is a callback to setup timeout on each write. Timeout func(enable bool) error // contains filtered or unexported fields }
Writer is not safe for concurrent use.
func (*Writer) DisableZlib ¶ added in v0.5.1
DisableZlib deactivates zlib deflating.
func (*Writer) EnableZlib ¶ added in v0.5.1
EnableZlib activates zlib deflating.
func (*Writer) EnableZlibLevel ¶ added in v0.8.1
EnableZlib activates zlib deflating with a given compression level.
Click to show internal directories.
Click to hide internal directories.