harmony 鸿蒙Sample Server Overview

  • 2022-08-09
  • 浏览 (731)

Sample Server Overview

The sample server provides a simple server instance for deploying update packages. It can be used as an auxiliary test environment for the UpdateService subsystem.

Basic Concepts

  • Package search service: one of the service capabilities provided by the UpdateService. It depends on the server that supports the TCP and SSL protocols.

  • Package search server: a server that provisions the package search service through the TCP connection and the SSL protocol. The sample server mentioned in this document is such a package search server.

  • Download server: an HTTP server.

  • update.serverip.search: a system parameter that indicates the IP address of the package search server configured on the UpdateService. The default value is 127.0.0.1.

Constraints

The following is an example of the JSON response returned by the server. Note that the verifyInfo field indicates the SHA-256 value of the update package, and the size field indicates the size of the update package, in bytes.

{
    "searchStatus": 0,
    "errMsg": "success",
    "checkResults": [{
        "versionName": "versionNameSample",
        "versionCode": "versionCodeSample",
        "verifyInfo": "verifyInfoSHA256Value1234567",
        "size": 1234567,
        "packageType": 1,
        "url": "http://serverAddressSample/packageNameSample.fileTypeSample",
        "descriptPackageId": "abcdefg1234567ABCDEFG"
    }],
    "descriptInfo": [{
        "descriptionType": 0,
        "content": "This package is used for update."
    }]
}

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Device Management

harmony 鸿蒙Peripheral Management Development

harmony 鸿蒙Input Device Development

harmony 鸿蒙Location Service Development

harmony 鸿蒙Mouse Pointer Development

harmony 鸿蒙Sample Server Development

harmony 鸿蒙Sensor Development

harmony 鸿蒙Sensor Overview

harmony 鸿蒙Stationary Development

harmony 鸿蒙USB Service Development

0  赞