inbound_connection.go 647 B

123456789101112131415161718
  1. package connhandler
  2. import (
  3. "github.com/v2ray/v2ray-core/app"
  4. )
  5. // A InboundConnectionHandlerFactory creates InboundConnectionHandler on demand.
  6. type InboundConnectionHandlerFactory interface {
  7. // Create creates a new InboundConnectionHandler with given configuration.
  8. Create(dispatch app.PacketDispatcher, config interface{}) (InboundConnectionHandler, error)
  9. }
  10. // A InboundConnectionHandler handles inbound network connections to V2Ray.
  11. type InboundConnectionHandler interface {
  12. // Listen starts a InboundConnectionHandler by listen on a specific port. This method is called
  13. // exactly once during runtime.
  14. Listen(port uint16) error
  15. }