packetaddr

package
v5.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 15 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PacketAddrType_name = map[int32]string{
		0: "None",
		1: "Packet",
	}
	PacketAddrType_value = map[string]int32{
		"None":   0,
		"Packet": 1,
	}
)

Enum value maps for PacketAddrType.

View Source
var File_common_net_packetaddr_config_proto protoreflect.FileDescriptor

Functions

func AttachAddressToPacket

func AttachAddressToPacket(data *buf.Buffer, address gonet.Addr) (*buf.Buffer, error)

AttachAddressToPacket relinquish ownership of data gain ownership of the returning value

func CreatePacketAddrConn

func CreatePacketAddrConn(ctx context.Context, dispatcher routing.Dispatcher, isStream bool) (net.PacketConn, error)

func ExtractAddressFromPacket

func ExtractAddressFromPacket(data *buf.Buffer) (*buf.Buffer, gonet.Addr, error)

ExtractAddressFromPacket relinquish ownership of data gain ownership of the returning value

func GetDestinationSubsetOf

func GetDestinationSubsetOf(dest net.Destination) (bool, error)

func ToPacketAddrConn

func ToPacketAddrConn(link *transport.Link, dest net.Destination) (net.PacketConn, error)

Types

type FusedConnection

type FusedConnection interface {
	net.PacketConn
	net.Conn
}

func ToPacketAddrConnWrapper

func ToPacketAddrConnWrapper(conn net.PacketConn, isStream bool) FusedConnection

type PacketAddrType

type PacketAddrType int32
const (
	PacketAddrType_None   PacketAddrType = 0
	PacketAddrType_Packet PacketAddrType = 1
)

func (PacketAddrType) Descriptor

func (PacketAddrType) Enum

func (x PacketAddrType) Enum() *PacketAddrType

func (PacketAddrType) EnumDescriptor deprecated

func (PacketAddrType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PacketAddrType.Descriptor instead.

func (PacketAddrType) Number

func (PacketAddrType) String

func (x PacketAddrType) String() string

func (PacketAddrType) Type

Jump to

Keyboard shortcuts

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