Arduino DLNA Server
|
Generic HttpStreamedMultiOutput Class which handles multicast streaming. We can optionally define some default (e.g. html) content that will be written at the beginning and at the end of the streaming session to the client. More...
#include <HttpStreamedMultiOutput.h>
Public Member Functions | |
HttpStreamedMultiOutput (const char *mime, const char *startHtml=nullptr, const char *endHtml=nullptr, int maxHistoryLength=0) | |
virtual const char * | mime () |
virtual bool | isValid (WiFiClient &client) |
virtual void | open (WiFiClient &client) |
virtual bool | isOpen () |
virtual void | close () |
virtual int | availableForWrite () |
Do not accept any writes if we are not connected. More... | |
virtual size_t | write (uint8_t *content, int len) |
virtual size_t | print (const char *str) |
virtual size_t | println (const char *str) |
virtual void | doLoop () |
Protected Member Functions | |
void | cleanup () |
void | onClose (WiFiClient &client) |
content that is written when the request is opened More... | |
void | addHistory (const char *line, bool delimiter, int len) |
adds the line to the history - removest oldest lines More... | |
Protected Attributes | |
HttpChunkWriter | writer |
List< WiFiClient > | clients |
Str * | history = nullptr |
int | max_history_length |
const char * | start = nullptr |
const char * | end = nullptr |
const char * | mime_type = nullptr |
int | id_value = 0 |
Generic HttpStreamedMultiOutput Class which handles multicast streaming. We can optionally define some default (e.g. html) content that will be written at the beginning and at the end of the streaming session to the client.
The output (write, print ...) functions are sending the same output to all open clients.
The id is used to identify the output stream so that we can potentially send different content to different clients.
We automatically manage all the clients which are open and clean up the closed clients to release the memory.
|
inline |
|
inlineprotected |
adds the line to the history - removest oldest lines
|
inlinevirtual |
Do not accept any writes if we are not connected.
|
inlineprotectedvirtual |
Implements tiny_dlna::HttpStreamedOutput.
|
inlinevirtual |
Implements tiny_dlna::HttpStreamedOutput.
|
inlinevirtual |
Implements tiny_dlna::HttpStreamedOutput.
|
inlinevirtual |
Implements tiny_dlna::HttpStreamedOutput.
|
inlinevirtual |
Implements tiny_dlna::HttpStreamedOutput.
|
inlinevirtual |
Implements tiny_dlna::HttpStreamedOutput.
|
inlineprotected |
content that is written when the request is opened
|
inlinevirtual |
Implements tiny_dlna::HttpStreamedOutput.
|
inlinevirtual |
Implements tiny_dlna::HttpStreamedOutput.
|
inlinevirtual |
Implements tiny_dlna::HttpStreamedOutput.
|
inlinevirtual |
Implements tiny_dlna::HttpStreamedOutput.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |