(Just barely) pass Autobahn tests chapter 1 - 10

This commit is contained in:
Alex Hultman
2018-11-21 22:46:17 +01:00
parent 8bf87c9147
commit 91620c6c42
6 changed files with 202 additions and 35 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ public:
// this method creates a new websocket context and attaches it to a path
TemplatedApp &ws(std::string pattern, std::function<void(void *, HttpRequest *)> connectHandler, std::function<void(uWS::WebSocket<SSL, true> *, std::string_view, uWS::OpCode)> messageHandler) {
// init the websocket context here!
uWS::WebSocketContext<SSL> *webSocketContext = uWS::WebSocketContext<SSL>::create(uWS::Loop::defaultLoop(), (typename StaticDispatch<SSL>::SOCKET_CONTEXT_TYPE *) httpContext);
uWS::WebSocketContext<SSL, true> *webSocketContext = uWS::WebSocketContext<SSL, true>::create(uWS::Loop::defaultLoop(), (typename StaticDispatch<SSL>::SOCKET_CONTEXT_TYPE *) httpContext);
webSocketContext->getExt()->messageHandler = messageHandler;