1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-19 19:06:43 -05:00
v2fly/transport/internet/request/request.go

43 lines
908 B
Go
Raw Normal View History

2022-09-06 15:23:27 -04:00
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)
}