libwebsockets
Lightweight C library for HTML5 websockets
HTML Chunked Substitution

Data Structures

struct  lws_process_html_args
 
struct  lws_process_html_state
 

Typedefs

typedef const char *(* lws_process_html_state_cb) (void *data, int index)
 

Enumerations

enum  http_status {
  HTTP_STATUS_OK = 200, HTTP_STATUS_NO_CONTENT = 204, HTTP_STATUS_MOVED_PERMANENTLY = 301, HTTP_STATUS_FOUND = 302,
  HTTP_STATUS_SEE_OTHER = 303, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_UNAUTHORIZED, HTTP_STATUS_PAYMENT_REQUIRED,
  HTTP_STATUS_FORBIDDEN, HTTP_STATUS_NOT_FOUND, HTTP_STATUS_METHOD_NOT_ALLOWED, HTTP_STATUS_NOT_ACCEPTABLE,
  HTTP_STATUS_PROXY_AUTH_REQUIRED, HTTP_STATUS_REQUEST_TIMEOUT, HTTP_STATUS_CONFLICT, HTTP_STATUS_GONE,
  HTTP_STATUS_LENGTH_REQUIRED, HTTP_STATUS_PRECONDITION_FAILED, HTTP_STATUS_REQ_ENTITY_TOO_LARGE, HTTP_STATUS_REQ_URI_TOO_LONG,
  HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, HTTP_STATUS_REQ_RANGE_NOT_SATISFIABLE, HTTP_STATUS_EXPECTATION_FAILED, HTTP_STATUS_INTERNAL_SERVER_ERROR = 500,
  HTTP_STATUS_NOT_IMPLEMENTED, HTTP_STATUS_BAD_GATEWAY, HTTP_STATUS_SERVICE_UNAVAILABLE, HTTP_STATUS_GATEWAY_TIMEOUT,
  HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED
}
 

Functions

LWS_VISIBLE LWS_EXTERN int lws_chunked_html_process (struct lws_process_html_args *args, struct lws_process_html_state *s)
 

Detailed Description

HTML chunked Substitution

APIs for receiving chunks of text, replacing a set of variable names via a callback, and then prepending and appending HTML chunked encoding headers.

Function Documentation

◆ lws_chunked_html_process()

LWS_VISIBLE LWS_EXTERN int lws_chunked_html_process ( struct lws_process_html_args args,
struct lws_process_html_state s 
)

#include <lib/libwebsockets.h>

lws_chunked_html_process() - generic chunked substitution

Parameters
argsbuffer to process using chunked encoding
scurrent processing state