mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 11:29:36 +03:00
Enhance TCP Fast Open (#310)
This commit is contained in:
@ -17,14 +17,14 @@ func TestTCPFastOpen(t *testing.T) {
|
||||
return b
|
||||
},
|
||||
}
|
||||
dest, err := tcpServer.StartContext(context.Background(), &SocketConfig{Tfo: SocketConfig_Enable})
|
||||
dest, err := tcpServer.StartContext(context.Background(), &SocketConfig{Tfo: 256})
|
||||
common.Must(err)
|
||||
defer tcpServer.Close()
|
||||
|
||||
ctx := context.Background()
|
||||
dialer := DefaultSystemDialer{}
|
||||
conn, err := dialer.Dial(ctx, nil, dest, &SocketConfig{
|
||||
Tfo: SocketConfig_Enable,
|
||||
Tfo: 1,
|
||||
})
|
||||
common.Must(err)
|
||||
defer conn.Close()
|
||||
|
Reference in New Issue
Block a user