Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Dialer = net.Dialer{ Timeout: 10 * time.Second, }
Dialer is the default dialer that this package uses for all its dialing.
View Source
var ErrClosed = errors.New("UDP connection closed")
ErrClosed is returned if a Write was called on a closed connection.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { GatewayIP string GatewayPort uint16 // contains filtered or unexported fields }
func DialConnectionCtx ¶ added in v0.10.0
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) UseContext ¶ added in v1.3.7
func (c *Connection) UseContext(ctx context.Context) error
UseContext lets the connection use the given context for its Write method. WriteCtx will override this context.
func (*Connection) UseSecret ¶ added in v1.3.7
func (c *Connection) UseSecret(secret [32]byte)
UseSecret uses the given secret. This method is not thread-safe, so it should only be used right after initialization.
Click to show internal directories.
Click to hide internal directories.