1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-10 06:16:53 -05:00
v2fly/transport/internet/request/request.go
2023-05-29 23:55:45 +01:00

43 lines
908 B
Go

package request
import (
"context"
"github.com/v2fly/v2ray-core/v5/common/net"
)
type TransportClientAssembly interface {
Tripper() Tripper
AutoImplDialer() Dialer
}
type TransportClientAssemblyReceiver interface {
OnTransportClientAssemblyReady(TransportClientAssembly)
}
type TransportServerAssembly interface {
TripperReceiver() TripperReceiver
SessionReceiver() SessionReceiver
AutoImplListener() Listener
}
type TransportServerAssemblyReceiver interface {
OnTransportServerAssemblyReady(TransportServerAssembly)
}
type SessionCreator interface {
NewSession(ctx context.Context, opts ...SessionOption) (Session, error)
}
type SessionReceiver interface {
OnNewSession(ctx context.Context, sess Session, opts ...SessionOption) error
}
type Dialer interface {
Dial(ctx context.Context) (net.Conn, error)
}
type Listener interface {
Listen(ctx context.Context) (net.Listener, error)
}