connhandler

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterInboundConnectionHandlerFactory

func RegisterInboundConnectionHandlerFactory(name string, factory InboundConnectionHandlerFactory) error

func RegisterOutboundConnectionHandlerFactory

func RegisterOutboundConnectionHandlerFactory(name string, factory OutboundConnectionHandlerFactory) error

Types

type InboundConnectionHandler

type InboundConnectionHandler interface {
	// Listen starts a InboundConnectionHandler by listen on a specific port. This method is called
	// exactly once during runtime.
	Listen(port v2net.Port) error
}

A InboundConnectionHandler handles inbound network connections to V2Ray.

type InboundConnectionHandlerFactory

type InboundConnectionHandlerFactory interface {
	// Create creates a new InboundConnectionHandler with given configuration.
	Create(space *app.Space, config interface{}) (InboundConnectionHandler, error)
}

A InboundConnectionHandlerFactory creates InboundConnectionHandler on demand.

func GetInboundConnectionHandlerFactory

func GetInboundConnectionHandlerFactory(name string) InboundConnectionHandlerFactory

type OutboundConnectionHandler

type OutboundConnectionHandler interface {
	// Dispatch sends one or more Packets to its destination.
	Dispatch(firstPacket v2net.Packet, ray ray.OutboundRay) error
}

An OutboundConnectionHandler handles outbound network connection for V2Ray.

type OutboundConnectionHandlerFactory

type OutboundConnectionHandlerFactory interface {
	// Create creates a new OutboundConnectionHandler with given config.
	Create(space *app.Space, config interface{}) (OutboundConnectionHandler, error)
}

An OutboundConnectionHandlerFactory creates OutboundConnectionHandler on demand.

func GetOutboundConnectionHandlerFactory

func GetOutboundConnectionHandlerFactory(name string) OutboundConnectionHandlerFactory

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL