Extension which implements the Arduino Stream functionality. Instead of writing to Serial you can write to a ExtensionStream object and look at the streamed output in your web browser. The data is managed with the help of a simple ring buffer. More...
#include <ExtensionStream.h>
Public Member Functions | |
ExtensionStream (const char *url, const char *mime, Stream &source) | |
Alternative way to provide data by reading from another stream. | |
ExtensionStream (const char *url, TinyMethodID action, const char *mime, const char *startHtml=nullptr, const char *endHtml=nullptr, int bufferSize=256, int historySize=1024) | |
Default Constructor. | |
int | available () |
int | availableForWrite () |
void | flush () |
virtual bool | isOpen () |
Checks if we have any open clients. | |
virtual void | open (HttpServer *server) |
int | peek () |
size_t | print (const char str[]) |
size_t | println (const char str[]) |
int | read () |
int | read (char *str, int len) |
void | setReplyHeader (Str &header) |
Defines a standard reply header - which can be binary data. | |
size_t | write (uint8_t *str, int len) |
size_t | write (uint8_t chr) |
![]() | |
virtual void | print (const char *str="")=0 |
virtual void | println (const char *str="")=0 |
virtual void | write (const char *str, int len)=0 |
Protected Member Functions | |
void | copyFromAltSource () |
virtual void | doLoop () override |
Protected Attributes | |
int | bufferSize |
ExtensionStreamBasic * | ext =nullptr |
bool | is_open =false |
HttpStreamedMultiOutput * | out =nullptr |
Stream * | pAltSource =nullptr |
RingBuffer * | ringBuffer =nullptr |
Extension which implements the Arduino Stream functionality. Instead of writing to Serial you can write to a ExtensionStream object and look at the streamed output in your web browser. The data is managed with the help of a simple ring buffer.