udpsdk

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UDPClient

type UDPClient struct {
	ID string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, cfgs ...UDPClientConfig) (*UDPClient, error)

func (*UDPClient) Close

func (c *UDPClient) Close() error

func (*UDPClient) ReceiveMessage

func (c *UDPClient) ReceiveMessage(msg chan<- []byte)

func (*UDPClient) SendMessage

func (c *UDPClient) SendMessage(msg []byte)

type UDPClientConfig

type UDPClientConfig struct {
	Gzip           bool
	WriteWait      time.Duration
	PongWait       time.Duration
	PingPeriod     time.Duration
	MaxMessageSize uint
	Addr           string
	TlsConf        *tls.Config
}

Jump to

Keyboard shortcuts

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