Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOption = &Options{ Timeout: time.Second * 5, KeepAlive: true, KeepAlivePeriod: time.Minute, Linger: -1, NoDelay: true, }
DefaultOption default tcp options
Functions ¶
func WithOptions ¶
WithOptions to wrap the tcp options
Types ¶
type Options ¶
type Options struct { Timeout time.Duration `json:"timeout"` KeepAlive bool `json:"keep-alive,string"` KeepAlivePeriod time.Duration `json:"keep-alive-period"` Linger int `json:"linger,string"` NoDelay bool `json:"nodelay,string"` SockBuf int `json:"sockbuf,string"` }
Options fot tcp transport
Click to show internal directories.
Click to hide internal directories.