mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-03 00:36:30 -05:00
add Closable to dispatcher interface
This commit is contained in:
parent
bf8a0b7290
commit
6ff1cfa253
@ -2,10 +2,12 @@ package udp
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/v2fly/v2ray-core/v5/common"
|
||||
"github.com/v2fly/v2ray-core/v5/common/buf"
|
||||
"github.com/v2fly/v2ray-core/v5/common/net"
|
||||
)
|
||||
|
||||
type DispatcherI interface {
|
||||
common.Closable
|
||||
Dispatch(ctx context.Context, destination net.Destination, payload *buf.Buffer)
|
||||
}
|
||||
|
@ -32,6 +32,10 @@ type Dispatcher struct {
|
||||
callback ResponseCallback
|
||||
}
|
||||
|
||||
func (v *Dispatcher) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewSplitDispatcher(dispatcher routing.Dispatcher, callback ResponseCallback) DispatcherI {
|
||||
return &Dispatcher{
|
||||
conns: make(map[net.Destination]*connEntry),
|
||||
|
Loading…
Reference in New Issue
Block a user