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

39 lines
686 B
Go

package request
import (
"context"
"github.com/v2fly/v2ray-core/v5/common"
)
type RoundTripperClient interface {
Tripper
TransportClientAssemblyReceiver
}
type RoundTripperServer interface {
common.Runnable
TransportServerAssemblyReceiver
}
type Tripper interface {
RoundTrip(ctx context.Context, req Request, opts ...RoundTripperOption) (resp Response, err error)
}
type TripperReceiver interface {
OnRoundTrip(ctx context.Context, req Request, opts ...RoundTripperOption) (resp Response, err error)
}
type RoundTripperOption interface {
RoundTripperOption()
}
type Request struct {
Data []byte
ConnectionTag []byte
}
type Response struct {
Data []byte
}