WPILibC++ 2025.0.0-alpha-1-14-g3b6f38d
http_parser.h File Reference
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Classes

struct  wpi::http_parser
 
struct  wpi::http_parser_settings
 
struct  wpi::http_parser_url
 

Namespaces

namespace  wpi
 

Macros

#define HTTP_PARSER_VERSION_MAJOR   2
 
#define HTTP_PARSER_VERSION_MINOR   8
 
#define HTTP_PARSER_VERSION_PATCH   1
 
#define HTTP_PARSER_STRICT   1
 
#define HTTP_MAX_HEADER_SIZE   (80*1024)
 
#define HTTP_STATUS_MAP(XX)
 
#define XX(num, name, string)   HTTP_STATUS_##name = num,
 
#define HTTP_METHOD_MAP(XX)
 
#define XX(num, name, string)   HTTP_##name = num,
 
#define HTTP_ERRNO_MAP(XX)
 
#define HTTP_ERRNO_GEN(n, s)   HPE_##n,
 
#define HTTP_PARSER_ERRNO(p)   ((::wpi::http_errno) (p)->http_errno)
 

Functions

unsigned long wpi::http_parser_version (void)
 
void wpi::http_parser_init (http_parser *parser, enum http_parser_type type)
 
void wpi::http_parser_settings_init (http_parser_settings *settings)
 
size_t wpi::http_parser_execute (http_parser *parser, const http_parser_settings *settings, const char *data, size_t len)
 
int wpi::http_should_keep_alive (const http_parser *parser)
 
const char * wpi::http_method_str (enum http_method m)
 
const char * wpi::http_status_str (enum http_status s)
 
const char * wpi::http_errno_name (enum http_errno err)
 
const char * wpi::http_errno_description (enum http_errno err)
 
void wpi::http_parser_url_init (struct http_parser_url *u)
 
int wpi::http_parser_parse_url (const char *buf, size_t buflen, int is_connect, struct http_parser_url *u)
 
void wpi::http_parser_pause (http_parser *parser, int paused)
 
int wpi::http_body_is_final (const http_parser *parser)
 

Macro Definition Documentation

◆ HTTP_ERRNO_GEN

#define HTTP_ERRNO_GEN (   n,
 
)    HPE_##n,

◆ HTTP_ERRNO_MAP

#define HTTP_ERRNO_MAP (   XX)

◆ HTTP_MAX_HEADER_SIZE

#define HTTP_MAX_HEADER_SIZE   (80*1024)

◆ HTTP_METHOD_MAP

#define HTTP_METHOD_MAP (   XX)

◆ HTTP_PARSER_ERRNO

#define HTTP_PARSER_ERRNO (   p)    ((::wpi::http_errno) (p)->http_errno)

◆ HTTP_PARSER_STRICT

#define HTTP_PARSER_STRICT   1

◆ HTTP_PARSER_VERSION_MAJOR

#define HTTP_PARSER_VERSION_MAJOR   2

◆ HTTP_PARSER_VERSION_MINOR

#define HTTP_PARSER_VERSION_MINOR   8

◆ HTTP_PARSER_VERSION_PATCH

#define HTTP_PARSER_VERSION_PATCH   1

◆ HTTP_STATUS_MAP

#define HTTP_STATUS_MAP (   XX)

◆ XX [1/2]

#define XX (   num,
  name,
  string 
)    HTTP_STATUS_##name = num,

◆ XX [2/2]

#define XX (   num,
  name,
  string 
)    HTTP_##name = num,