udp

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2020 License: ISC Imports: 8 Imported by: 1

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.

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 DialConnectionCtx(ctx context.Context, addr string, ssrc uint32) (*Connection, error)

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) Start

func (c *Connection) Start(secret *[32]byte)

func (*Connection) Write

func (c *Connection) Write(b []byte) (int, error)

Write sends bytes into the voice UDP connection.

func (*Connection) WriteCtx added in v0.10.0

func (c *Connection) WriteCtx(ctx context.Context, b []byte) (int, error)

WriteCtx sends bytes into the voice UDP connection with a timeout.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL