Add QtCreator project for addon
This commit is contained in:
parent
0636cfb088
commit
a6b897cdbc
24
addon.pro
Normal file
24
addon.pro
Normal file
@ -0,0 +1,24 @@
|
||||
TEMPLATE = app
|
||||
CONFIG += console c++1z
|
||||
CONFIG -= app_bundle
|
||||
CONFIG -= qt
|
||||
|
||||
SOURCES += \
|
||||
src/addon.cpp \
|
||||
uWebSockets/uSockets/src/eventing/epoll.c \
|
||||
uWebSockets/uSockets/src/context.c \
|
||||
uWebSockets/uSockets/src/socket.c \
|
||||
uWebSockets/uSockets/src/eventing/libuv.c \
|
||||
uWebSockets/uSockets/src/ssl.c \
|
||||
uWebSockets/uSockets/src/loop.c
|
||||
|
||||
INCLUDEPATH += targets/node-v11.1.0/include/node
|
||||
INCLUDEPATH += uWebSockets/src
|
||||
INCLUDEPATH += uWebSockets/uSockets/src
|
||||
|
||||
HEADERS += \
|
||||
src/AppWrapper.h \
|
||||
src/HttpRequestWrapper.h \
|
||||
src/HttpResponseWrapper.h \
|
||||
src/Utilities.h \
|
||||
src/WebSocketWrapper.h
|
@ -1,6 +1,10 @@
|
||||
// App.post and all other methods - requires good templating?
|
||||
// test so that we pass Autobahn with compression/without compression with SSL/without SSL
|
||||
|
||||
/* Helping QtCreator */
|
||||
#include <v8.h>
|
||||
#include "Utilities.h"
|
||||
using namespace v8;
|
||||
|
||||
/* uWS.App.ws('/pattern', options) */
|
||||
template <typename APP>
|
||||
|
@ -2,6 +2,11 @@
|
||||
// req.getUrl()
|
||||
// req.onAbort ?
|
||||
|
||||
/* Helping QtCreator */
|
||||
#include <v8.h>
|
||||
#include "Utilities.h"
|
||||
using namespace v8;
|
||||
|
||||
/* The only thing this req needs is getHeader and similar, getParameter, getUrl and so on */
|
||||
Persistent<Object> reqTemplate;
|
||||
|
||||
|
@ -2,6 +2,11 @@
|
||||
// res.write
|
||||
// res.tryEnd
|
||||
|
||||
/* Helping QtCreator */
|
||||
#include <v8.h>
|
||||
#include "Utilities.h"
|
||||
using namespace v8;
|
||||
|
||||
// this whole template thing could be one struct with members to order tihngs better
|
||||
Persistent<Object> resTemplate[2];
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
#ifndef ADDON_UTILITIES_H
|
||||
#define ADDON_UTILITIES_H
|
||||
|
||||
class NativeString {
|
||||
char *data;
|
||||
size_t length;
|
||||
@ -37,3 +40,5 @@ public:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -2,6 +2,12 @@
|
||||
// ws.close(lalala)
|
||||
// ws.?
|
||||
|
||||
/* Helping QtCreator */
|
||||
#include "App.h"
|
||||
#include <v8.h>
|
||||
#include "Utilities.h"
|
||||
using namespace v8;
|
||||
|
||||
// also wrap all of this in some common struct
|
||||
Persistent<Object> wsTemplate[2];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user