Try using function2 for HttpResponse::onWritable

This commit is contained in:
Alex Hultman
2019-01-15 07:11:30 +01:00
parent 8efea340e6
commit 95cafc2c7b
3 changed files with 1624 additions and 2 deletions
+3 -1
View File
@@ -24,6 +24,8 @@
#include "AsyncSocketData.h"
#include <functional>
#include "f2/function2.hpp"
namespace uWS {
template <bool SSL>
@@ -41,7 +43,7 @@ private:
};
/* Per socket event handlers */
std::function<bool(int)> onWritable;
fu2::unique_function<bool(int)> onWritable;
std::function<void()> onAborted;
//std::function<void()> onData;