v2ray-core/proxy/inbound_connection.go

19 lines
641 B
Go
Raw Normal View History

2015-10-14 12:51:19 +00:00
package proxy
import (
"github.com/v2ray/v2ray-core/app"
)
2015-10-15 11:15:59 +00:00
// A InboundConnectionHandlerFactory creates InboundConnectionHandler on demand.
2015-10-14 12:51:19 +00:00
type InboundConnectionHandlerFactory interface {
2015-10-15 11:15:59 +00:00
// Create creates a new InboundConnectionHandler with given configuration.
2015-10-14 12:51:19 +00:00
Create(dispatch app.PacketDispatcher, config interface{}) (InboundConnectionHandler, error)
}
2015-10-15 11:15:59 +00:00
// A InboundConnectionHandler handles inbound network connections to V2Ray.
2015-10-14 12:51:19 +00:00
type InboundConnectionHandler interface {
2015-10-15 11:15:59 +00:00
// Listen starts a InboundConnectionHandler by listen on a specific port. This method is called
// exactly once during runtime.
2015-10-14 12:51:19 +00:00
Listen(port uint16) error
}