udp

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BufferLimit specifies buffer size that is sufficient to handle full-size UDP datagram or TCP segment in one step
	BufferLimit = 2<<16 - 1
	// DisconnectSequence is used to disconnect UDP sessions
	DisconnectSequence = "~."
)

Variables

This section is empty.

Functions

func StartClient

func StartClient(proto string, host string, port string)

StartClient starts UDP connector

func StartServer

func StartServer(proto string, port string)

StartServer starts UDP listener

func TransferPackets

func TransferPackets(con net.Conn, in io.Reader, out io.Writer)

TransferPackets launches receive goroutine first, wait for address from it (if needed), launches send goroutine then

Types

type Progress

type Progress struct {
	// contains filtered or unexported fields
}

Progress indicates transfer status

Jump to

Keyboard shortcuts

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