Versions in this module Expand all Collapse all v1 v1.8.16 Jul 1, 2024 v1.8.11 Jul 1, 2024 Changes in this version + var File_transport_internet_udp_config_proto protoreflect.FileDescriptor + func DialDispatcher(ctx context.Context, dispatcher routing.Dispatcher) (net.PacketConn, error) + func ReadUDPMsg(conn *net.UDPConn, payload []byte, oob []byte) (int, int, int, *net.UDPAddr, error) + func RetrieveOriginalDest(oob []byte) net.Destination + type Config struct + func (*Config) Descriptor() ([]byte, []int) + func (*Config) ProtoMessage() + func (x *Config) ProtoReflect() protoreflect.Message + func (x *Config) Reset() + func (x *Config) String() string + type Dispatcher struct + func NewDispatcher(dispatcher routing.Dispatcher, callback ResponseCallback) *Dispatcher + func (v *Dispatcher) Dispatch(ctx context.Context, destination net.Destination, payload *buf.Buffer) + func (v *Dispatcher) RemoveRay() + type Hub struct + func ListenUDP(ctx context.Context, address net.Address, port net.Port, ...) (*Hub, error) + func (h *Hub) Addr() net.Addr + func (h *Hub) Close() error + func (h *Hub) Receive() <-chan *udp.Packet + func (h *Hub) WriteTo(payload []byte, dest net.Destination) (int, error) + type HubOption func(h *Hub) + func HubCapacity(capacity int) HubOption + func HubReceiveOriginalDestination(r bool) HubOption + type ResponseCallback func(ctx context.Context, packet *udp.Packet)