32 size_t write(uint8_t c)
override {
return write(&c, 1); }
34 size_t write(
const uint8_t *data,
size_t len)
override {
35 if (
p_out ==
nullptr || len == 0)
return 0;
45 if (
p_out ==
nullptr)
return;
46 p_out->print(
"0\r\n\r\n");
79template <
class Client,
class Server>
143 LOGE(
"Content type is not defined");
181 LOGD(
"copy data...");
189 LOGI(
"max output size reached...");
196 LOGI(
"client was not connected");
314 WiFi.setSleep(
false);
320 Serial.print(
"IP address: ");
330 const char *response =
"HTTP/1.1 200 OK";
332 LOGI(
"%s", response);
341 client_obj.println(
"Content-Disposition: inline");
348 client_obj.println(
"Transfer-Encoding: chunked");
349 LOGI(
"Transfer-Encoding: chunked");
355 LOGE(
"connection was closed");
370 LOGI(
"sendReply - calling callback");
374 }
else if (
in !=
nullptr) {
376 LOGI(
"sendReply - Returning audio stream...");
380 LOGE(
"connection was closed");
401 std::string currentLine;
402 currentLine.reserve(128);
409 LOGI(
"Request: %s", currentLine.c_str());
413 if (currentLine.length() == 0) {
423 }
else if (c !=
'\r') {
static HardwareSerial Serial
Definition Arduino.h:179
@ HEX
Definition Arduino.h:54
#define TRACED()
Definition AudioLoggerIDF.h:31
#define LOGI(...)
Definition AudioLoggerIDF.h:28
#define LOGD(...)
Definition AudioLoggerIDF.h:27
#define LOGE(...)
Definition AudioLoggerIDF.h:30
bool connected()
Definition Arduino.h:167
virtual int read(uint8_t *buffer, size_t len)
Definition Arduino.h:165
void stop()
Definition Arduino.h:164
virtual size_t write(const uint8_t *data, size_t len)
Definition Arduino.h:120
virtual int available()
Definition Arduino.h:139