Pass opCode around, add Loop::setPostHandler

This commit is contained in:
Alex Hultman
2018-11-04 10:44:11 +01:00
parent 0d09d1db02
commit 894609e638
6 changed files with 20 additions and 5 deletions
+1 -1
View File
@@ -52,7 +52,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)> messageHandler) {
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);