core: v2ray.com/core/transport/internet/udp Index | Files

package udp

import "v2ray.com/core/transport/internet/udp"

Index

Package Files

config.go config.pb.go dialer.go dispatcher.go errors.generated.go hub.go hub_linux.go udp.go

func DialDispatcher Uses

func DialDispatcher(ctx context.Context, dispatcher routing.Dispatcher) (net.PacketConn, error)

func ReadUDPMsg Uses

func ReadUDPMsg(conn *net.UDPConn, payload []byte, oob []byte) (int, int, int, *net.UDPAddr, error)

func RetrieveOriginalDest Uses

func RetrieveOriginalDest(oob []byte) net.Destination

type Config Uses

type Config struct {
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*Config) Descriptor Uses

func (*Config) Descriptor() ([]byte, []int)

func (*Config) ProtoMessage Uses

func (*Config) ProtoMessage()

func (*Config) Reset Uses

func (m *Config) Reset()

func (*Config) String Uses

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown Uses

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal Uses

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge Uses

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size Uses

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal Uses

func (m *Config) XXX_Unmarshal(b []byte) error

type Dispatcher Uses

type Dispatcher struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

func NewDispatcher Uses

func NewDispatcher(dispatcher routing.Dispatcher, callback ResponseCallback) *Dispatcher

func (*Dispatcher) Dispatch Uses

func (v *Dispatcher) Dispatch(ctx context.Context, destination net.Destination, payload *buf.Buffer)

func (*Dispatcher) RemoveRay Uses

func (v *Dispatcher) RemoveRay(dest net.Destination)

type Hub Uses

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

func ListenUDP Uses

func ListenUDP(ctx context.Context, address net.Address, port net.Port, streamSettings *internet.MemoryStreamConfig, options ...HubOption) (*Hub, error)

func (*Hub) Addr Uses

func (h *Hub) Addr() net.Addr

Addr implements net.Listener.

func (*Hub) Close Uses

func (h *Hub) Close() error

Close implements net.Listener.

func (*Hub) Receive Uses

func (h *Hub) Receive() <-chan *udp.Packet

func (*Hub) WriteTo Uses

func (h *Hub) WriteTo(payload []byte, dest net.Destination) (int, error)

type HubOption Uses

type HubOption func(h *Hub)

func HubCapacity Uses

func HubCapacity(capacity int) HubOption

func HubReceiveOriginalDestination Uses

func HubReceiveOriginalDestination(r bool) HubOption

type ResponseCallback Uses

type ResponseCallback func(ctx context.Context, packet *udp.Packet)

Package udp imports 19 packages (graph) and is imported by 31 packages. Updated 2019-03-31. Refresh now. Tools for package owners.