Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
http_client_ctx Struct Reference

Representation of an HTTP client connected to the server. More...

#include <server.h>

Data Fields

int fd
 Socket descriptor associated with the server.
 
unsigned char buffer [HTTP_SERVER_CLIENT_BUFFER_SIZE]
 Client data buffer.
 
unsigned char * cursor
 Cursor indicating currently processed byte.
 
size_t data_len
 Data left to process in the buffer.
 
int window_size
 Connection-level window size.
 
enum http_server_state server_state
 Server state for the associated client.
 
struct http_frame current_frame
 Currently processed HTTP/2 frame.
 
struct http_resource_detailcurrent_detail
 Currently processed resource detail.
 
struct http_hpack_header_buf header_field
 HTTP/2 header parser context.
 
struct http_stream_ctx streams [HTTP_SERVER_MAX_STREAMS]
 HTTP/2 streams context.
 
struct http_parser_settings parser_settings
 HTTP/1 parser configuration.
 
struct http_parser parser
 HTTP/1 parser context.
 
unsigned char url_buffer [HTTP_SERVER_MAX_URL_LENGTH]
 Request URL.
 
unsigned char content_type [HTTP_SERVER_MAX_CONTENT_TYPE_LEN]
 Request content type.
 
unsigned char header_buffer [HTTP_SERVER_MAX_HEADER_LEN]
 Temp buffer for currently processed header (HTTP/1 only).
 
size_t content_len
 Request content length.
 
enum http_method method
 Request method.
 
enum http1_parser_state parser_state
 HTTP/1 parser state.
 
int http1_frag_data_len
 Length of the payload length in the currently processed request fragment (HTTP/1 only).
 
struct k_work_delayable inactivity_timer
 Client inactivity timer.
 
bool headers_sent: 1
 Flag indicating that headers were sent in the reply.
 
bool preface_sent: 1
 Flag indicating that HTTP2 preface was sent.
 
bool has_upgrade_header: 1
 Flag indicating that upgrade header was present in the request.
 
bool http2_upgrade: 1
 Flag indicating HTTP/2 upgrade takes place.
 
bool websocket_upgrade: 1
 Flag indicating Websocket upgrade takes place.
 
bool websocket_sec_key_next: 1
 Flag indicating Websocket key is being processed.
 

Detailed Description

Representation of an HTTP client connected to the server.

Field Documentation

◆ buffer

unsigned char http_client_ctx::buffer[HTTP_SERVER_CLIENT_BUFFER_SIZE]

Client data buffer.


◆ content_len

size_t http_client_ctx::content_len

Request content length.

◆ content_type

unsigned char http_client_ctx::content_type[HTTP_SERVER_MAX_CONTENT_TYPE_LEN]

Request content type.

◆ current_detail

struct http_resource_detail* http_client_ctx::current_detail

Currently processed resource detail.

◆ current_frame

struct http_frame http_client_ctx::current_frame

Currently processed HTTP/2 frame.

◆ cursor

unsigned char* http_client_ctx::cursor

Cursor indicating currently processed byte.

◆ data_len

size_t http_client_ctx::data_len

Data left to process in the buffer.

◆ fd

int http_client_ctx::fd

Socket descriptor associated with the server.

◆ has_upgrade_header

bool http_client_ctx::has_upgrade_header

Flag indicating that upgrade header was present in the request.

◆ header_buffer

unsigned char http_client_ctx::header_buffer[HTTP_SERVER_MAX_HEADER_LEN]

Temp buffer for currently processed header (HTTP/1 only).

◆ header_field

struct http_hpack_header_buf http_client_ctx::header_field

HTTP/2 header parser context.

◆ headers_sent

bool http_client_ctx::headers_sent

Flag indicating that headers were sent in the reply.

◆ http1_frag_data_len

int http_client_ctx::http1_frag_data_len

Length of the payload length in the currently processed request fragment (HTTP/1 only).

◆ http2_upgrade

bool http_client_ctx::http2_upgrade

Flag indicating HTTP/2 upgrade takes place.

◆ inactivity_timer

struct k_work_delayable http_client_ctx::inactivity_timer

Client inactivity timer.

The client connection is closed by the server when it expires.

◆ method

enum http_method http_client_ctx::method

Request method.

◆ parser

struct http_parser http_client_ctx::parser

HTTP/1 parser context.

◆ parser_settings

struct http_parser_settings http_client_ctx::parser_settings

HTTP/1 parser configuration.

◆ parser_state

enum http1_parser_state http_client_ctx::parser_state

HTTP/1 parser state.

◆ preface_sent

bool http_client_ctx::preface_sent

Flag indicating that HTTP2 preface was sent.

◆ server_state

enum http_server_state http_client_ctx::server_state

Server state for the associated client.

◆ streams

struct http_stream_ctx http_client_ctx::streams[HTTP_SERVER_MAX_STREAMS]

HTTP/2 streams context.

◆ url_buffer

unsigned char http_client_ctx::url_buffer[HTTP_SERVER_MAX_URL_LENGTH]

Request URL.

◆ websocket_sec_key_next

bool http_client_ctx::websocket_sec_key_next

Flag indicating Websocket key is being processed.

◆ websocket_upgrade

bool http_client_ctx::websocket_upgrade

Flag indicating Websocket upgrade takes place.

◆ window_size

int http_client_ctx::window_size

Connection-level window size.


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