Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseClientConn ¶
func CloseClientConn(cc ClientConn)
Types ¶
type ClientConn ¶
type KeepAlive ¶ added in v2.4.0
type KeepAlive struct {
// contains filtered or unexported fields
}
func NewKeepAlive ¶ added in v2.4.0
func NewKeepAlive(maxRetries uint32, onInactive OnInactiveFunc, sendPing func(cc ClientConn, receivePong func()) (func(), error)) *KeepAlive
func (*KeepAlive) OnInactive ¶ added in v2.4.0
func (m *KeepAlive) OnInactive(cc ClientConn)
type Monitor ¶
type Monitor = interface { CheckInactivity(now time.Time, cc ClientConn) Notify() }
func NewInactivityMonitor ¶
func NewInactivityMonitor(duration time.Duration, onInactive OnInactiveFunc) Monitor
func NewNilMonitor ¶ added in v2.4.0
func NewNilMonitor() Monitor
type OnInactiveFunc ¶
type OnInactiveFunc = func(cc ClientConn)
Click to show internal directories.
Click to hide internal directories.