Fix capi bug, add Makefile

This commit is contained in:
Alex Hultman
2022-01-07 03:47:23 +01:00
parent 5df695e02a
commit 937afd1669
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ extern "C" {
void uws_res_end(uws_res_t *res, const char *data, size_t length) {
uWS::HttpResponse<false> *uwsRes = (uWS::HttpResponse<false> *) res;
uwsRes->end(data, length);
uwsRes->end(std::string_view(data, length));
}
void uws_app_listen(uws_app_t *app, int port, void (*handler)(void *)) {
+4
View File
@@ -0,0 +1,4 @@
default:
make -C ../uSockets
g++ -O3 -std=c++17 -flto -DUWS_NO_ZLIB -I ../src -I ../uSockets/src App.cpp -c
gcc -O3 -flto example.c *.o -lstdc++ ../uSockets/uSockets.a -o example