SSDP::BasicMessage Class Reference

Handles incoming messages. More...

#include <Message.h>

Inheritance diagram for SSDP::BasicMessage:
Collaboration diagram for SSDP::BasicMessage:

Public Member Functions

HttpError parse (char *data, size_t len)
 
- Public Member Functions inherited from BasicHttpHeaders
 BasicHttpHeaders ()
 
void clear ()
 Reset to default state. More...
 
HttpError parse (char *data, size_t len, http_parser_type type=HTTP_BOTH)
 Parse header data into name/value pairs. More...
 
const Headeroperator[] (unsigned i) const
 
String toString (unsigned i) const
 
const char *& operator[] (const char *name)
 
unsigned count () const
 Get number of parsed headers. More...
 
const char * operator[] (const char *name) const
 Find a header by name. More...
 
const char * operator[] (HttpHeaderFieldName name) const
 
bool contains (const char *name) const
 
bool contains (HttpHeaderFieldName name) const
 
http_parser_type type () const
 Get the type of message parsed. More...
 
HttpMethod method () const
 Obtain request method. More...
 
void setMethod (HttpMethod method)
 
HttpStatus status () const
 Obtain response status. More...
 
unsigned contentLength () const
 Obtain content length field value. More...
 
- Public Member Functions inherited from HttpHeaderFields
Flags getFlags (HttpHeaderFieldName name) const
 Get flags (if any) for given header field. More...
 
String toString (HttpHeaderFieldName name) const
 
String toString (HttpHeaderFieldName name, const String &value) const
 
HttpHeaderFieldName fromString (const String &name) const
 Find the enumerated value for the given field name string. More...
 
HttpHeaderFieldName findOrCreate (const String &name)
 Find the enumerated value for the given field name string, create a custom entry if not found. More...
 
void clear ()
 

Additional Inherited Members

- Public Types inherited from HttpHeaderFields
enum class  Flag { Multi }
 Flag values providing additional information about header fields. More...
 
using Flags = BitSet< uint8_t, Flag, 1 >
 
- Static Public Member Functions inherited from HttpHeaderFields
static String toString (const String &name, const String &value)
 Produce a string for output in the HTTP header, with line ending. More...
 
- Public Attributes inherited from SSDP::BaseMessage< BasicHttpHeaders >
MessageType type
 
IpAddress remoteIP
 
uint16_t remotePort
 
- Static Public Attributes inherited from BasicHttpHeaders
static constexpr size_t maxValues = 16
 

Detailed Description

Handles incoming messages.

Note
Contains name/value pairs as pointers.

Member Function Documentation

◆ parse()

HttpError SSDP::BasicMessage::parse ( char *  data,
size_t  len 
)

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