Documentation ¶
Overview ¶
Package tcp provides various TCP-related utilities. The TCP mux code provided by this package originated with InfluxDB.
Index ¶
Constants ¶
View Source
const ( // DefaultTimeout is the default length of time to wait for first byte. DefaultTimeout = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Layer ¶
type Layer struct {
// contains filtered or unexported fields
}
Layer represents the connection between nodes.
type Mux ¶
type Mux struct { // The amount of time to wait for the first header byte. Timeout time.Duration // Out-of-band error logger Logger *log.Logger // contains filtered or unexported fields }
Mux multiplexes a network connection.
func NewMux ¶
NewMux returns a new instance of Mux for ln. If adv is nil, then the addr of ln is used.
Click to show internal directories.
Click to hide internal directories.