Wayland example window
This commit is contained in:
parent
160b746182
commit
26f54c4581
30 changed files with 825 additions and 22 deletions
17
src/network/web/HttpMessageHandler.cpp
Normal file
17
src/network/web/HttpMessageHandler.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "HttpMessageHandler.h"
|
||||
|
||||
#include "HttpRequest.h"
|
||||
#include "HttpResponse.h"
|
||||
|
||||
std::string HttpMessageHandler::onMessage(const std::string& message)
|
||||
{
|
||||
HttpRequest request;
|
||||
request.parseMessage(message);
|
||||
|
||||
HttpResponse response;
|
||||
response.SetBody("Hello world!");
|
||||
|
||||
const auto response_message = response.ToString();
|
||||
|
||||
return response_message;
|
||||
}
|
9
src/network/web/HttpMessageHandler.h
Normal file
9
src/network/web/HttpMessageHandler.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "ISocketMessageHandler.h"
|
||||
|
||||
class HttpMessageHandler : public ISocketMessageHandler
|
||||
{
|
||||
public:
|
||||
std::string onMessage(const std::string& message) override;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue