transport

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericConn

type GenericConn interface {
	net.Conn
	ReadFrom(b []byte) (n int, addr SockAddr, error error)
}

type SockAddr

type SockAddr interface {
	net.Addr
	GetIPAddr() net.IP
	GetPort() int
	GetZone() string
}

type Transport

type Transport interface {
	Listen(network string, addr SockAddr) (GenericConn, error)
	Dial(ctx context.Context, laddr SockAddr, raddr SockAddr) (GenericConn, error)
	ResolveAddr(network, addr string) (SockAddr, error)
	AllowMulticast() bool
	// Return network, udp, websockets, tcp, ipv4, etc.
	Network() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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