AlteriomPainlessMesh v2.1.1
Easy ESP32/ESP8266 mesh networking with Alteriom IoT extensions
Loading...
Searching...
No Matches
Public Member Functions | List of all members
painlessmesh::gateway::ResponseExcerpt Class Reference

The start and the end of a response body, read a byte at a time. More...

#include <gateway.hpp>

Public Member Functions

bool add (char c)
 
void add (const TSTRING &text)
 
TSTRING text () const
 

Detailed Description

The start and the end of a response body, read a byte at a time.

The gateway cannot keep a whole body, and a service may put its verdict at either end: CallMeBot echoes the request first and says why last (#463), so a reply of a kilobyte kept as its first 512 bytes had lost the part that mattered before any summary ran. This keeps the first GATEWAY_RESPONSE_HEAD_BYTES and a rolling last GATEWAY_RESPONSE_TAIL_BYTES, and text() joins them with " ... " when bytes were dropped between.

Member Function Documentation

◆ add() [1/2]

bool painlessmesh::gateway::ResponseExcerpt::add ( char  c)
inline

Keep one more byte; false once GATEWAY_RESPONSE_SCAN_BYTES were seen.

◆ add() [2/2]

void painlessmesh::gateway::ResponseExcerpt::add ( const TSTRING &  text)
inline

◆ text()

TSTRING painlessmesh::gateway::ResponseExcerpt::text ( ) const
inline

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