Feature/httpd (#94)

* Stub code for http server

* can send a response, cannot process body yet

* write headers to the response

* remove commented code

* add simple test + set default http handler

* tweak CI + unittest

* add missing file

* rewrite http::trim in a simple way

* doc
This commit is contained in:
Benjamin Sergeant
2019-06-23 14:54:21 -07:00
committed by GitHub
parent b26e9d0338
commit f84bc53c8d
27 changed files with 834 additions and 237 deletions

View File

@ -19,12 +19,12 @@
namespace ix
{
using OnConnectionCallback =
std::function<void(std::shared_ptr<WebSocket>, std::shared_ptr<ConnectionState>)>;
class WebSocketServer final : public SocketServer
{
public:
using OnConnectionCallback =
std::function<void(std::shared_ptr<WebSocket>, std::shared_ptr<ConnectionState>)>;
WebSocketServer(int port = SocketServer::kDefaultPort,
const std::string& host = SocketServer::kDefaultHost,
int backlog = SocketServer::kDefaultTcpBacklog,