github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/transport/internet/udp/dispatcher.go (about) 1 package udp 2 3 import ( 4 "context" 5 "io" 6 7 "github.com/v2fly/v2ray-core/v5/common" 8 "github.com/v2fly/v2ray-core/v5/common/buf" 9 "github.com/v2fly/v2ray-core/v5/common/net" 10 ) 11 12 type DispatcherI interface { 13 common.Closable 14 Dispatch(ctx context.Context, destination net.Destination, payload *buf.Buffer) 15 } 16 17 var DispatcherConnectionTerminationSignalReceiverMark = "DispatcherConnectionTerminationSignalReceiverMark" 18 19 type DispatcherConnectionTerminationSignalReceiver interface { 20 io.Closer 21 }