HTTP client configuration structure.
Configuration struct for a HTTP client instance. This structure should be initialized by the http_client_get_config_defaults function before being modified by the user application.
#include <http_client.h>
Data Fields | |
uint16_t | port |
TCP port number of HTTP. More... | |
char * | recv_buffer |
Rx buffer. More... | |
uint32_t | recv_buffer_size |
Maximum size of the receive buffer. More... | |
uint32_t | send_buffer_size |
Send buffer size in the HTTP client service. More... | |
uint16_t | timeout |
Time value for the request time out. More... | |
struct sw_timer_module * | timer_inst |
Timer module for the request timeout Default value is NULL. More... | |
uint8_t | tls |
A flag for the whether using the TLS socket or not. More... | |
const char * | user_agent |
User agent of this client. More... | |
uint16_t http_client_config::port |
TCP port number of HTTP.
Default value is 80.
Referenced by http_client_get_config_defaults(), http_client_send_request(), http_client_socket_resolve_handler(), and start_download().
char * http_client_config::recv_buffer |
Rx buffer.
Default value is NULL.
Referenced by _http_client_handle_entity(), _http_client_handle_header(), _http_client_move_buffer(), _http_client_read_chuked_entity(), _http_client_recv_packet(), http_client_deinit(), http_client_get_config_defaults(), and http_client_init().
uint32_t http_client_config::recv_buffer_size |
Maximum size of the receive buffer.
Default value is 256.
Referenced by _http_client_handle_entity(), _http_client_handle_header(), _http_client_read_chuked_entity(), _http_client_recv_packet(), configure_http_client(), http_client_get_config_defaults(), and http_client_init().
uint32_t http_client_config::send_buffer_size |
Send buffer size in the HTTP client service.
This buffer is located in the stack. Therefore, The size of the buffer increases the speed will increase, but it may cause a stack overflow. Apache server is not supported that packet header is divided in the multiple packets. So, it MUST bigger than 192. Default value is 192.
Referenced by _http_client_request(), http_client_get_config_defaults(), and http_client_init().
uint16_t http_client_config::timeout |
Time value for the request time out.
Unit is milliseconds. Default value is 20000. (20 seconds)
Referenced by _http_client_recved_packet(), http_client_get_config_defaults(), http_client_init(), and http_client_socket_event_handler().
struct sw_timer_module * http_client_config::timer_inst |
Timer module for the request timeout Default value is NULL.
Referenced by _http_client_recved_packet(), configure_http_client(), http_client_get_config_defaults(), http_client_init(), and http_client_socket_event_handler().
uint8_t http_client_config::tls |
A flag for the whether using the TLS socket or not.
Default value is 0.
Referenced by configure_http_client(), http_client_get_config_defaults(), and http_client_send_request().
const char * http_client_config::user_agent |
User agent of this client.
This value is must located in the Heap or code region. Default value is Atmel/{version}
Referenced by _http_client_request(), configure_http_client(), and http_client_get_config_defaults().