Preperations for websocket

This commit is contained in:
2022-06-30 05:59:32 +02:00
parent aa073c2385
commit dd07aaede6
12 changed files with 468 additions and 20 deletions
+14 -13
View File
@@ -38,21 +38,22 @@ void RootResponseHandler::sendResponse()
ESP_LOGI(TAG, "sending response for (%s:%hi)",
m_clientConnection.remote_endpoint().address().to_string().c_str(), m_clientConnection.remote_endpoint().port());
m_response = fmt::format("<html>"
"<head>"
"<title>asio test webserver</title>"
"</head>"
"<body>"
"<h1>asio test webserver</h1>"
"<ul>"
"<li><a href=\"/debug\">Debug</a></li>"
"<li><a href=\"/chunked\">Chunked</a></li>"
"</ul>"
"</body>"
"</html>");
m_response = "<html>"
"<head>"
"<title>asio test webserver</title>"
"</head>"
"<body>"
"<h1>asio test webserver</h1>"
"<ul>"
"<li><a href=\"/debug\">Debug</a></li>"
"<li><a href=\"/chunked\">Chunked</a></li>"
"<li><a href=\"/websocket\">Websocket</a></li>"
"</ul>"
"</body>"
"</html>";
m_response = fmt::format("HTTP/1.1 200 Ok\r\n"
"Connection: close\r\n"
"Connection: keep-alive\r\n"
"Content-Type: text/html\r\n"
"Content-Length: {}\r\n"
"\r\n"