anjay
|
#include <download.h>
Data Fields | ||
anjay_download_result_t | result | |
union { | ||
avs_error_t error | ||
int status_code | ||
} | details | |
union { ... } details |
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 failedavs_errno(AVS_ECONNABORTED)
- remote resource is no longer validavs_errno(AVS_ECONNREFUSED)
- server responded with a reset message on the application layer (e.g. CoAP Reset)avs_errno(AVS_ECONNRESET)
- connection lost or resetavs_errno(AVS_EINVAL)
- could not parse response from the serveravs_errno(AVS_EIO)
- internal error in the transfer codeavs_errno(AVS_EMSGSIZE)
- could not send or receive datagram because it was too largeavs_errno(AVS_ENOMEM)
- out of memoryavs_errno(AVS_ETIMEDOUT)
- could not receive data from server in time anjay_download_result_t result |
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.