-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
request.go
42 lines (32 loc) · 908 Bytes
/
request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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)
}