Microchip® Advanced Software Framework

http_entity Struct Reference

A structure that the implementation of HTTP entity.

#include <http_entity.h>

Data Fields

void(* close )(void *priv_data)
 Close the entity. More...
 
int(* get_contents_length )(void *priv_data)
 Get content length. More...
 
const char *(* get_contents_type )(void *priv_data)
 Get content mime type. More...
 
uint8_t is_chunked
 A flag for the using the chunked encoding transfer or not. More...
 
void * priv_data
 Private data of this entity. More...
 
int(* read )(void *priv_data, char *buffer, uint32_t size, uint32_t written)
 Read the content. More...
 

void(* http_entity::close)(void *priv_data)

Close the entity.

Completed to send request. So release the resource.

Parameters
[in]priv_dataPrivate data of this entity.
int(* http_entity::get_contents_length)(void *priv_data)

Get content length.

If using the chunked encoding, This function does not needed.

Parameters
[in]priv_dataPrivate data of this entity.
Returns
Content length of entity.
const char*(* http_entity::get_contents_type)(void *priv_data)

Get content mime type.

Parameters
[in]priv_dataPrivate data of this entity.
Returns
Content type of entity.
uint8_t http_entity::is_chunked

A flag for the using the chunked encoding transfer or not.

void* http_entity::priv_data

Private data of this entity.

Stored various data necessary for the operation of the entity.

int(* http_entity::read)(void *priv_data, char *buffer, uint32_t size, uint32_t written)

Read the content.

Parameters
[in]priv_dataPrivate data of this entity.
[in]bufferA buffer that stored read data.
[in]sizeMaximum size of the buffer.
[in]writtentotal size of ever read.
Returns
Read size.