WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::net Namespace Reference

Namespaces

namespace  uv
namespace  detail

Classes

class  raw_socket_ostream
class  TCPStream
class  raw_uv_ostream
 wpi::util::raw_ostream style output to a wpi::util::SmallVector of uv::Buffer buffers. More...
class  NetworkAcceptor
class  WebSocket
 RFC 6455 compliant WebSocket client and server implementation. More...
struct  http_parser
struct  http_parser_settings
struct  http_parser_url
class  DsClient
class  MulticastServiceResolver
class  WebServer
 A web server using the HTTP protocol. More...
class  UrlParser
 Parses a URL into its constituent components. More...
class  NetworkStream
class  TCPAcceptor
class  PortForwarder
 Forward ports to another host. More...
class  HttpQueryMap
 Map for looking up elements of the query portion of a URI. More...
class  HttpPath
 Class for HTTP path matching. More...
class  HttpPathRef
 Proxy reference object for a portion of a HttpPath. More...
class  HttpLocation
class  HttpRequest
class  HttpConnection
class  HttpMultipartScanner
class  EventLoopRunner
 Executes an event loop on a separate thread. More...
class  ParallelTcpConnector
 Parallel TCP connector. More...
class  HttpWebSocketServerConnection
 A server-side HTTP connection that also accepts WebSocket upgrades. More...
class  raw_socket_istream
class  WebSocketServerHelper
 WebSocket HTTP server helper. More...
class  WebSocketServer
 Dedicated WebSocket server. More...
class  MulticastServiceAnnouncer
class  UDPClient
class  HttpParser
 HTTP protocol parser. More...
class  HttpServerConnection
class  TCPConnector
class  WorkerThread
class  WorkerThread< R(T...)>

Typedefs

typedef int(* http_data_cb) (http_parser *, const char *at, size_t length)
typedef int(* http_cb) (http_parser *)

Enumerations

enum  http_status
enum  http_method
enum  http_parser_type { HTTP_REQUEST , HTTP_RESPONSE , HTTP_BOTH }
enum  flags {
  F_CHUNKED = 1 << 0 , F_CONNECTION_KEEP_ALIVE = 1 << 1 , F_CONNECTION_CLOSE = 1 << 2 , F_CONNECTION_UPGRADE = 1 << 3 ,
  F_TRAILING = 1 << 4 , F_UPGRADE = 1 << 5 , F_SKIPBODY = 1 << 6 , F_CONTENTLENGTH = 1 << 7
}
enum  http_errno
enum  http_parser_url_fields {
  UF_SCHEMA = 0 , UF_HOST = 1 , UF_PORT = 2 , UF_PATH = 3 ,
  UF_QUERY = 4 , UF_FRAGMENT = 5 , UF_USERINFO = 6 , UF_MAX = 7
}

Functions

unsigned long http_parser_version (void)
void http_parser_init (http_parser *parser, enum http_parser_type type)
void http_parser_settings_init (http_parser_settings *settings)
size_t http_parser_execute (http_parser *parser, const http_parser_settings *settings, const char *data, size_t len)
int http_should_keep_alive (const http_parser *parser)
const char * http_method_str (enum http_method m)
const char * http_status_str (enum http_status s)
const char * http_errno_name (enum http_errno err)
const char * http_errno_description (enum http_errno err)
void http_parser_url_init (struct http_parser_url *u)
int http_parser_parse_url (const char *buf, size_t buflen, int is_connect, struct http_parser_url *u)
void http_parser_pause (http_parser *parser, int paused)
int http_body_is_final (const http_parser *parser)
std::string_view UnescapeURI (std::string_view str, wpi::util::SmallVectorImpl< char > &buf, bool *error)
std::string_view EscapeURI (std::string_view str, wpi::util::SmallVectorImpl< char > &buf, bool spacePlus=true)
std::string_view EscapeHTML (std::string_view str, wpi::util::SmallVectorImpl< char > &buf)
bool ParseHttpHeaders (wpi::util::raw_istream &is, wpi::util::SmallVectorImpl< char > *contentType, wpi::util::SmallVectorImpl< char > *contentLength)
bool FindMultipartBoundary (wpi::util::raw_istream &is, std::string_view boundary, std::string *saveBuf)
std::string_view MimeTypeFromPath (std::string_view path)
std::string GetHostname ()
std::string_view GetHostname (wpi::util::SmallVectorImpl< char > &name)
int SocketErrno ()
std::string SocketStrerror (int code)
std::string SocketStrerror ()

Typedef Documentation

◆ http_cb

typedef int(* wpi::net::http_cb) (http_parser *)

◆ http_data_cb

typedef int(* wpi::net::http_data_cb) (http_parser *, const char *at, size_t length)

Enumeration Type Documentation

◆ flags

Enumerator
F_CHUNKED 
F_CONNECTION_KEEP_ALIVE 
F_CONNECTION_CLOSE 
F_CONNECTION_UPGRADE 
F_TRAILING 
F_UPGRADE 
F_SKIPBODY 
F_CONTENTLENGTH 

◆ http_errno

◆ http_method

◆ http_parser_type

Enumerator
HTTP_REQUEST 
HTTP_RESPONSE 
HTTP_BOTH 

◆ http_parser_url_fields

Enumerator
UF_SCHEMA 
UF_HOST 
UF_PORT 
UF_PATH 
UF_QUERY 
UF_FRAGMENT 
UF_USERINFO 
UF_MAX 

◆ http_status

Function Documentation

◆ EscapeHTML()

std::string_view wpi::net::EscapeHTML ( std::string_view str,
wpi::util::SmallVectorImpl< char > & buf )

◆ EscapeURI()

std::string_view wpi::net::EscapeURI ( std::string_view str,
wpi::util::SmallVectorImpl< char > & buf,
bool spacePlus = true )

◆ FindMultipartBoundary()

bool wpi::net::FindMultipartBoundary ( wpi::util::raw_istream & is,
std::string_view boundary,
std::string * saveBuf )

◆ GetHostname() [1/2]

std::string wpi::net::GetHostname ( )

◆ GetHostname() [2/2]

std::string_view wpi::net::GetHostname ( wpi::util::SmallVectorImpl< char > & name)

◆ http_body_is_final()

int wpi::net::http_body_is_final ( const http_parser * parser)

◆ http_errno_description()

const char * wpi::net::http_errno_description ( enum http_errno err)

◆ http_errno_name()

const char * wpi::net::http_errno_name ( enum http_errno err)

◆ http_method_str()

const char * wpi::net::http_method_str ( enum http_method m)

◆ http_parser_execute()

size_t wpi::net::http_parser_execute ( http_parser * parser,
const http_parser_settings * settings,
const char * data,
size_t len )

◆ http_parser_init()

void wpi::net::http_parser_init ( http_parser * parser,
enum http_parser_type type )

◆ http_parser_parse_url()

int wpi::net::http_parser_parse_url ( const char * buf,
size_t buflen,
int is_connect,
struct http_parser_url * u )

◆ http_parser_pause()

void wpi::net::http_parser_pause ( http_parser * parser,
int paused )

◆ http_parser_settings_init()

void wpi::net::http_parser_settings_init ( http_parser_settings * settings)

◆ http_parser_url_init()

void wpi::net::http_parser_url_init ( struct http_parser_url * u)

◆ http_parser_version()

unsigned long wpi::net::http_parser_version ( void )

◆ http_should_keep_alive()

int wpi::net::http_should_keep_alive ( const http_parser * parser)

◆ http_status_str()

const char * wpi::net::http_status_str ( enum http_status s)

◆ MimeTypeFromPath()

std::string_view wpi::net::MimeTypeFromPath ( std::string_view path)

◆ ParseHttpHeaders()

bool wpi::net::ParseHttpHeaders ( wpi::util::raw_istream & is,
wpi::util::SmallVectorImpl< char > * contentType,
wpi::util::SmallVectorImpl< char > * contentLength )

◆ SocketErrno()

int wpi::net::SocketErrno ( )

◆ SocketStrerror() [1/2]

std::string wpi::net::SocketStrerror ( )
inline

◆ SocketStrerror() [2/2]

std::string wpi::net::SocketStrerror ( int code)

◆ UnescapeURI()

std::string_view wpi::net::UnescapeURI ( std::string_view str,
wpi::util::SmallVectorImpl< char > & buf,
bool * error )