Microchip® Advanced Software Framework

http_client_config Struct Reference

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_moduletimer_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.

char* http_client_config::recv_buffer

Rx buffer.

Default value is NULL.

uint32_t http_client_config::recv_buffer_size

Maximum size of the receive buffer.

Default value is 256.

Referenced by configure_http_client().

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.

uint16_t http_client_config::timeout

Time value for the request time out.

Unit is milliseconds. Default value is 20000. (20 seconds)

struct sw_timer_module* http_client_config::timer_inst

Timer module for the request timeout Default value is NULL.

Referenced by configure_http_client().

uint8_t http_client_config::tls

A flag for the whether using the TLS socket or not.

Default value is 0.

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 configure_http_client().