mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-22 21:49:10 -04:00
more comments
This commit is contained in:
@@ -4,10 +4,15 @@ import (
|
||||
"github.com/v2ray/v2ray-core/app"
|
||||
)
|
||||
|
||||
// A InboundConnectionHandlerFactory creates InboundConnectionHandler on demand.
|
||||
type InboundConnectionHandlerFactory interface {
|
||||
// Create creates a new InboundConnectionHandler with given configuration.
|
||||
Create(dispatch app.PacketDispatcher, config interface{}) (InboundConnectionHandler, error)
|
||||
}
|
||||
|
||||
// A InboundConnectionHandler handles inbound network connections to V2Ray.
|
||||
type InboundConnectionHandler interface {
|
||||
// Listen starts a InboundConnectionHandler by listen on a specific port. This method is called
|
||||
// exactly once during runtime.
|
||||
Listen(port uint16) error
|
||||
}
|
||||
|
||||
@@ -5,10 +5,14 @@ import (
|
||||
"github.com/v2ray/v2ray-core/transport/ray"
|
||||
)
|
||||
|
||||
// An OutboundConnectionHandlerFactory creates OutboundConnectionHandler on demand.
|
||||
type OutboundConnectionHandlerFactory interface {
|
||||
// Create creates a new OutboundConnectionHandler with given config.
|
||||
Create(config interface{}) (OutboundConnectionHandler, error)
|
||||
}
|
||||
|
||||
// An OutboundConnectionHandler handles outbound network connection for V2Ray.
|
||||
type OutboundConnectionHandler interface {
|
||||
// Dispatch sends one or more Packets to its destination.
|
||||
Dispatch(firstPacket v2net.Packet, ray ray.OutboundRay) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user