Documentation ¶
Index ¶
- func ReadUDPMsg(conn *net.UDPConn, payload []byte, oob []byte) (int, int, int, *net.UDPAddr, error)
- func RetrieveOriginalDest(oob []byte) v2net.Destination
- func SetOriginalDestOptions(fd int) error
- type Dispatcher
- type Hub
- type ListenOption
- type Payload
- type PayloadHandler
- type PayloadQueue
- type ResponseCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadUDPMsg ¶ added in v1.24.4
func RetrieveOriginalDest ¶ added in v1.24.2
func RetrieveOriginalDest(oob []byte) v2net.Destination
func SetOriginalDestOptions ¶ added in v1.24.2
Types ¶
type Dispatcher ¶
func NewDispatcher ¶
func NewDispatcher(dispatcher dispatcher.Interface) *Dispatcher
func (*Dispatcher) Dispatch ¶
func (v *Dispatcher) Dispatch(ctx context.Context, destination v2net.Destination, payload *buf.Buffer, callback ResponseCallback)
func (*Dispatcher) RemoveRay ¶
func (v *Dispatcher) RemoveRay(dest v2net.Destination)
type Hub ¶
func (*Hub) Connection ¶
Connection return the net.Conn underneath this hub. Private: Visible for testing only
type ListenOption ¶ added in v1.24.2
type ListenOption struct { Callback PayloadHandler ReceiveOriginalDest bool Concurrency int }
type Payload ¶
type Payload struct {
// contains filtered or unexported fields
}
Payload represents a single UDP payload.
type PayloadHandler ¶
type PayloadHandler func(payload *buf.Buffer, source v2net.Destination, originalDest v2net.Destination)
PayloadHandler is function to handle Payload.
type PayloadQueue ¶
type PayloadQueue struct {
// contains filtered or unexported fields
}
PayloadQueue is a queue of Payload.
func NewPayloadQueue ¶
func NewPayloadQueue(option ListenOption) *PayloadQueue
NewPayloadQueue returns a new PayloadQueue.
func (*PayloadQueue) Close ¶
func (v *PayloadQueue) Close()
func (*PayloadQueue) Dequeue ¶
func (v *PayloadQueue) Dequeue(queue <-chan Payload)
func (*PayloadQueue) Enqueue ¶
func (v *PayloadQueue) Enqueue(payload Payload)
type ResponseCallback ¶
Click to show internal directories.
Click to hide internal directories.