1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-10-03 17:23:43 -04:00
v2fly/proxy/common/connhandler/outbound_connection.go

19 lines
642 B
Go
Raw Normal View History

package connhandler
2015-10-14 08:51:19 -04:00
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
}