connections.go 389 B

1234567891011121314
  1. package adapter
  2. import (
  3. "context"
  4. "net"
  5. N "github.com/sagernet/sing/common/network"
  6. )
  7. type ConnectionManager interface {
  8. Lifecycle
  9. NewConnection(ctx context.Context, this N.Dialer, conn net.Conn, metadata InboundContext, onClose N.CloseHandlerFunc)
  10. NewPacketConnection(ctx context.Context, this N.Dialer, conn N.PacketConn, metadata InboundContext, onClose N.CloseHandlerFunc)
  11. }