|
arduino-audio-tools
|
A simple Arduino Webserver which streams the result This class is based on the WiFiServer class. All you need to do is to provide the data with a callback method or from an Arduino Stream: in -copy> client. More...
#include <AudioServerT.h>
Public Member Functions | |
| AudioServerT (const char *network, const char *password, int port=80) | |
| Construct a new Audio WAV Server object. | |
| AudioServerT (int port=80) | |
| Construct a new Audio Server object We assume that the WiFi is already connected. | |
| bool | begin (AudioServerDataCallback cb, const char *contentType) |
| Start the server. The data must be provided by a callback method. | |
| bool | begin (Stream &in, const char *contentType) |
| Start the server. You need to be connected to WiFI before calling this method. | |
| bool | copy () |
| Add this method to your loop Returns true while the client is connected. (The same functionality like doLoop()) | |
| bool | doLoop () |
| Add this method to your loop Returns true while the client is connected. | |
| bool | isClientConnected () |
| Checks if any clinent has connnected. | |
| Stream & | out () |
| Provides the output stream. | |
| Client * | out_ptr () |
| Provides a pointer to the WiFiClient. | |
| void | setConverter (BaseConverter *c) |
| defines a converter that will be used when the audio is rendered | |
| void | setCopyBufferSize (int size) |
| Changes the copy buffer size. | |
Protected Member Functions | |
| void | connectWiFi () |
| void | processClient () |
| virtual void | sendReplyContent () |
| virtual void | sendReplyHeader () |
| void | setupServer (int port) |
Protected Attributes | |
| AudioServerDataCallback | callback = nullptr |
| Client | client_obj |
| const char * | content_type = nullptr |
| BaseConverter * | converter_ptr = nullptr |
| StreamCopy | copier |
| Stream * | in = nullptr |
| size_t | max_bytes = 0 |
| char * | network = nullptr |
| char * | password = nullptr |
| size_t | sent = 0 |
| Server | server |
A simple Arduino Webserver which streams the result This class is based on the WiFiServer class. All you need to do is to provide the data with a callback method or from an Arduino Stream: in -copy> client.
Construct a new Audio Server object We assume that the WiFi is already connected.
Construct a new Audio WAV Server object.
| network | |
| password |
|
inline |
Start the server. The data must be provided by a callback method.
| cb | |
| contentType | Mime Type of result |
Start the server. You need to be connected to WiFI before calling this method.
| in | |
| contentType | Mime Type of result |
Add this method to your loop Returns true while the client is connected. (The same functionality like doLoop())
Add this method to your loop Returns true while the client is connected.
Checks if any clinent has connnected.
Provides a pointer to the WiFiClient.
Reimplemented in AudioEncoderServerT< Client, Server >.
Reimplemented in AudioEncoderServerT< Client, Server >.
defines a converter that will be used when the audio is rendered
Changes the copy buffer size.
|
protected |