1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00
v2fly/proxy/inbound_connection.go

19 lines
641 B
Go
Raw Normal View History

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