mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-04 16:37:12 -05:00
update comments
This commit is contained in:
parent
4c661bee47
commit
4f27a07c29
@ -12,17 +12,21 @@ import (
|
|||||||
|
|
||||||
// An Inbound processes inbound connections.
|
// An Inbound processes inbound connections.
|
||||||
type Inbound interface {
|
type Inbound interface {
|
||||||
|
// Network returns a list of network that this inbound supports. Connections with not-supported networks will not be passed into Process().
|
||||||
Network() net.NetworkList
|
Network() net.NetworkList
|
||||||
|
|
||||||
|
// Process processes a connection of given network. If necessary, the Inbound can dispatch the connection to an Outbound.
|
||||||
Process(context.Context, net.Network, internet.Connection, dispatcher.Interface) error
|
Process(context.Context, net.Network, internet.Connection, dispatcher.Interface) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// An Outbound process outbound connections.
|
// An Outbound process outbound connections.
|
||||||
type Outbound interface {
|
type Outbound interface {
|
||||||
|
// Process processes the given connection. The given dialer may be used to dial a system outbound connection.
|
||||||
Process(context.Context, ray.OutboundRay, Dialer) error
|
Process(context.Context, ray.OutboundRay, Dialer) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dialer is used by OutboundHandler for creating outbound connections.
|
// Dialer is used by OutboundHandler for creating outbound connections.
|
||||||
type Dialer interface {
|
type Dialer interface {
|
||||||
|
// Dial dials a system connection to the given destination.
|
||||||
Dial(ctx context.Context, destination net.Destination) (internet.Connection, error)
|
Dial(ctx context.Context, destination net.Destination) (internet.Connection, error)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user