Documentation ¶
Index ¶
- Constants
- Variables
- type Dialer
- type DialerOption
- type Listener
- type ListenerOption
- func WithListenerDial(f func(network, address string) (net.Conn, error)) ListenerOption
- func WithListenerDialContext(f func(ctx context.Context, network, address string) (net.Conn, error)) ListenerOption
- func WithListenerHeartTimeout(d time.Duration) ListenerOption
- func WithListenerSynAck(synAck bool) ListenerOption
- func WithListenerSynAckTimeout(d time.Duration) ListenerOption
Constants ¶
View Source
const ( DatagramHeart = uint8(1) + iota DatagramSyn DatagramSynAck DatagramAck )
View Source
const DatagramFlag = uint16(3553)
View Source
const DatagramLen = 2 + 1 + 1
View Source
const DatagramVersion = uint8(1)
Variables ¶
View Source
var ErrProtocol = errors.New(`protocol error`)
Functions ¶
This section is empty.
Types ¶
type Dialer ¶
type Dialer struct {
// contains filtered or unexported fields
}
func (*Dialer) DialContext ¶
type DialerOption ¶
type DialerOption interface {
// contains filtered or unexported methods
}
func WithDialerHeart ¶
func WithDialerHeart(heart time.Duration) DialerOption
func WithDialerHeartTimeout ¶
func WithDialerHeartTimeout(timeout time.Duration) DialerOption
func WithDialerSynAck ¶
func WithDialerSynAck(synAck bool) DialerOption
func WithDialerTimeout ¶
func WithDialerTimeout(timeout time.Duration) DialerOption
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
type ListenerOption ¶
type ListenerOption interface {
// contains filtered or unexported methods
}
func WithListenerDial ¶
func WithListenerDial(f func(network, address string) (net.Conn, error)) ListenerOption
func WithListenerDialContext ¶
func WithListenerHeartTimeout ¶
func WithListenerHeartTimeout(d time.Duration) ListenerOption
func WithListenerSynAck ¶
func WithListenerSynAck(synAck bool) ListenerOption
func WithListenerSynAckTimeout ¶
func WithListenerSynAckTimeout(d time.Duration) ListenerOption
Click to show internal directories.
Click to hide internal directories.