inbound_connection.go 685 B

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