在线咨询
Skip to content

xl_dl_create_p2sp_task ​

说明: ​

创建 P2SP 下载任务。

语法: ​

c
int32_t xl_dl_create_p2sp_task(const xl_dl_create_p2sp_info* create_info, uint64_t* task_id);

参数: ​

[in]create_info: 指向 struct xl_dl_create_p2sp_info_t 结构体的指针。

c
struct xl_dl_create_p2sp_info_t {
  const char* save_path;  // 文件保存路径, utf8 编码
  const char* save_name;  // 文件名称, utf8 编码
  const char* url;        // 下载 URL, utf8 编码
};

[in, out]task_id: 任务创建成功后任务 ID 被设置到该指针指向的变量中。

返回值: ​

成功返回 0,失败返回相应错误码。