1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-20 10:56:07 -04:00
v2fly/proxy/outbound_connection.go

19 lines
636 B
Go
Raw Normal View History

2015-10-14 08:51:19 -04:00
package proxy
import (
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/transport/ray"
)
2015-10-15 07:15:59 -04:00
// An OutboundConnectionHandlerFactory creates OutboundConnectionHandler on demand.
2015-10-14 08:51:19 -04:00
type OutboundConnectionHandlerFactory interface {
2015-10-15 07:15:59 -04:00
// Create creates a new OutboundConnectionHandler with given config.
2015-10-14 08:51:19 -04:00
Create(config interface{}) (OutboundConnectionHandler, error)
}
2015-10-15 07:15:59 -04:00
// An OutboundConnectionHandler handles outbound network connection for V2Ray.
2015-10-14 08:51:19 -04:00
type OutboundConnectionHandler interface {
2015-10-15 07:15:59 -04:00
// Dispatch sends one or more Packets to its destination.
2015-10-14 08:51:19 -04:00
Dispatch(firstPacket v2net.Packet, ray ray.OutboundRay) error
}