udp

package
v1.7.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = &Options{
	MaxPacketSize: 1400,
	MaxBacklog:    16,
	ReusePort:     false,
}

DefaultOptions default udp options

Functions

func New

func New() transport.Factory

New udp transport factory

func WithOptions

func WithOptions(option *Options) transport.Option

WithOptions to wrap the udp options

Types

type Options

type Options struct {
	MaxPacketSize int32 `json:"max-packet-size"`
	MaxBacklog    int32 `json:"max-backlog"`
	ReusePort     bool  `json:"reuse-port"`
}

Options to define the udp

func FromContext

func FromContext(ctx context.Context, def *Options) *Options

FromContext to unwrap the udp options

Jump to

Keyboard shortcuts

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