[#205] sdk/client: Support option to set dial timeout

There is a need to set dial timeout in SDK client that is used in case of
internal connection opening. Add DialTimeout option constructor to support
this feature.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-23 14:05:27 +03:00 committed by Alex Vanin
parent 03ac6bedb4
commit 5ee500bb43
6 changed files with 23 additions and 8 deletions

View file

@ -1013,6 +1013,7 @@ func v2ObjectClient(proto TransportProtocol, opts *clientOptions) (*v2object.Cli
optsV2 = []v2object.Option{
v2object.WithGlobalOpts(
client.WithNetworkAddress(opts.addr),
client.WithDialTimeout(opts.dialTimeout),
),
}
}