anjay
Loading...
Searching...
No Matches
anjay_download_status_t Struct Reference

#include <download.h>

Data Fields

anjay_download_result_t result
 
union { 
 
   avs_error_t   error 
 
   int   status_code 
 
details 
 

Field Documentation

◆ [union]

union { ... } details

◆ error

avs_error_t error

Error code. Only valid if result is ANJAY_DOWNLOAD_ERR_FAILED.

Possible values include (but are not limited to):

  • avs_errno(AVS_EADDRNOTAVAIL) - DNS resolution failed
  • avs_errno(AVS_ECONNABORTED) - remote resource is no longer valid
  • avs_errno(AVS_ECONNREFUSED) - server responded with a reset message on the application layer (e.g. CoAP Reset)
  • avs_errno(AVS_ECONNRESET) - connection lost or reset
  • avs_errno(AVS_EINVAL) - could not parse response from the server
  • avs_errno(AVS_EIO) - internal error in the transfer code
  • avs_errno(AVS_EMSGSIZE) - could not send or receive datagram because it was too large
  • avs_errno(AVS_ENOMEM) - out of memory
  • avs_errno(AVS_ETIMEDOUT) - could not receive data from server in time

◆ result

◆ status_code

int status_code

Protocol-specific status code. Only valid if result is ANJAY_DOWNLOAD_ERR_INVALID_RESPONSE.

Currently it may be a HTTP status code (e.g. 404 or 501), or a CoAP code (e.g. 132 or 161 - these examples are canonically interpreted as 4.04 and 5.01, respectively). If any user log is to depend on status codes, it is expected that it will be interpreted in line with the URL originally passed to anjay_download for the same download.


The documentation for this struct was generated from the following file: