Emit drain event, add comments, etc

This commit is contained in:
Alex Hultman
2018-12-28 13:14:57 +01:00
parent 44fbd44211
commit 59b3fee3fe
3 changed files with 55 additions and 27 deletions
+3 -3
View File
@@ -29,9 +29,9 @@ template <bool, bool> struct WebSocket;
template <bool SSL>
struct WebSocketContextData {
/* The callbacks for this context */
std::function<void(WebSocket<SSL, true> *, std::string_view, uWS::OpCode)> messageHandler;
std::function<void(uWS::WebSocket<SSL, true> *)> drainHandler;
std::function<void(uWS::WebSocket<SSL, true> *, int, std::string_view)> closeHandler;
std::function<void(WebSocket<SSL, true> *, std::string_view, uWS::OpCode)> messageHandler = nullptr;
std::function<void(uWS::WebSocket<SSL, true> *)> drainHandler = nullptr;
std::function<void(uWS::WebSocket<SSL, true> *, int, std::string_view)> closeHandler = nullptr;
};
}