FTP.getTiming

Get various timings defined in etc.c.curl.CurlInfo. The value is usable only if the return value is equal to etc.c.curl.CurlError.ok.

struct FTP
getTiming
(,
ref double val
)

Parameters

timing CurlInfo

one of the timings defined in etc.c.curl.CurlInfo. The values are: etc.c.curl.CurlInfo.namelookup_time, etc.c.curl.CurlInfo.connect_time, etc.c.curl.CurlInfo.pretransfer_time, etc.c.curl.CurlInfo.starttransfer_time, etc.c.curl.CurlInfo.redirect_time, etc.c.curl.CurlInfo.appconnect_time, etc.c.curl.CurlInfo.total_time.

val double

the actual value of the inquired timing.

Return Value

Type: CurlCode

The return code of the operation. The value stored in val should be used only if the return value is etc.c.curl.CurlInfo.ok.

Examples

import std.net.curl;
import etc.c.curl : CurlError, CurlInfo;

auto client = FTP();
client.addCommand("RNFR my_file.txt");
client.addCommand("RNTO my_renamed_file.txt");
upload("my_file.txt", "ftp.digitalmars.com", client);

double val;
CurlCode code;

code = client.getTiming(CurlInfo.namelookup_time, val);
assert(code == CurlError.ok);

Meta