BITS实现软件下载上传管理

来源:互联网 发布:淘宝网店 编辑:程序博客网 时间:2024/06/05 17:01

Using BITS

The following steps show how to perform a file transfer using the BITS interfaces.

To perform a file transfer

  1. Connect to the BITS service.
  2. Create a transfer job.
  3. Add files to the job.
  4. Start the job.
  5. Determine if BITS successfully transferred the files.
  6. Complete the job.

The previous steps show how to transfer files using the default property values for a job. You can change the default behavior by changing one or more of the job's property values. For example, you can change the priority that the job is processed relative to other jobs in the queue, specify your own proxy setting, and register to receive event notification when BITS has transferred the files. For more information, see Setting and Retrieving the Properties of a Job.

This section also contains the following topics:

 

  • Best Practices When Using BITS
  • Enumerating jobs in the transfer queue
  • Enumerating files in a job
  • Handling errors
  • Retrieve the reply from an upload-reply job

For sample code that uses the BITS interfaces, see BITS Samples and Tools.