diff options
| author | Alex Pickering <alex@cogarr.net> | 2021-09-12 16:58:26 -0500 |
|---|---|---|
| committer | Alex Pickering <alex@cogarr.net> | 2021-09-12 16:58:26 -0500 |
| commit | 346304da786a652f25f73ee80957ec6fd16716c8 (patch) | |
| tree | 682717483aa24b6119d82856d48038345f44f7aa /src/lua-nng-http.c | |
| parent | 835cda73fe2cf1d8c99d7599e9bfb92cd70444e9 (diff) | |
| download | lua-nng-346304da786a652f25f73ee80957ec6fd16716c8.tar.gz lua-nng-346304da786a652f25f73ee80957ec6fd16716c8.tar.bz2 lua-nng-346304da786a652f25f73ee80957ec6fd16716c8.zip | |
Line endings to unix
Convert all line endings to unix line endings.
Diffstat (limited to 'src/lua-nng-http.c')
| -rw-r--r-- | src/lua-nng-http.c | 106 |
1 files changed, 54 insertions, 52 deletions
diff --git a/src/lua-nng-http.c b/src/lua-nng-http.c index 61f7401..c3bc89f 100644 --- a/src/lua-nng-http.c +++ b/src/lua-nng-http.c @@ -1,52 +1,54 @@ -#include <lua.h>
-#include <lauxlib.h>
-#include <lualib.h>
-
-#define NNG_STATIC_LIB
-
-#include <nng/nng.h>
-
-#include <nng/transport/inproc/inproc.h>
-#include <nng/transport/ipc/ipc.h>
-#include <nng/transport/tcp/tcp.h>
-#include <nng/transport/tls/tls.h>
-#include <nng/transport/zerotier/zerotier.h>
-
-#include <nng/protocol/pair1/pair.h>
-#include <nng/protocol/bus0/bus.h>
-#include <nng/protocol/pubsub0/pub.h>
-#include <nng/protocol/pubsub0/sub.h>
-#include <nng/protocol/pipeline0/pull.h>
-#include <nng/protocol/pipeline0/push.h>
-#include <nng/protocol/reqrep0/req.h>
-#include <nng/protocol/reqrep0/rep.h>
-#include <nng/protocol/survey0/respond.h>
-#include <nng/protocol/survey0/survey.h>
-
-void handle_callback(nng_aio *aio){
-
-}
-
-//handler_alloc(string path,function callback) :: http_handler
-int lnng_http_handler_alloc(lua_State *L){
-
-}
-
-static const struct luaL_Reg nng_http_handler_m[] = {
- {NULL, NULL}
-};
-
-static const struct luaL_Reg nng_http_f[] = {
- {"handler_alloc",lnng_http_handler_alloc},
- {NULL, NULL}
-};
-
-int luaopen_nng_http(lua_State *L){
- luaL_newmetatable(L,"nng.http.handler");
- luaL_newlib(L,nng_http_handler_m);
- lua_setfield(L,-2,"__index");
- lua_pop(L,1);
-
- luaL_newlib(L,nng_http_f);
- return 1;
-}
+#include <lua.h> +#include <lauxlib.h> +#include <lualib.h> + +#define NNG_STATIC_LIB + +#include <nng/nng.h> + +#include <nng/transport/inproc/inproc.h> +#include <nng/transport/ipc/ipc.h> +#include <nng/transport/tcp/tcp.h> +#include <nng/transport/tls/tls.h> +#include <nng/transport/zerotier/zerotier.h> + +#include <nng/protocol/pair1/pair.h> +#include <nng/protocol/bus0/bus.h> +#include <nng/protocol/pubsub0/pub.h> +#include <nng/protocol/pubsub0/sub.h> +#include <nng/protocol/pipeline0/pull.h> +#include <nng/protocol/pipeline0/push.h> +#include <nng/protocol/reqrep0/req.h> +#include <nng/protocol/reqrep0/rep.h> +#include <nng/protocol/survey0/respond.h> +#include <nng/protocol/survey0/survey.h> + +#include "lua-nng-common.h" + +void handle_callback(nng_aio *aio){ + +} + +//handler_alloc(string path,function callback) :: http_handler +int lnng_http_handler_alloc(lua_State *L){ + +} + +static const struct luaL_Reg nng_http_handler_m[] = { + {NULL, NULL} +}; + +static const struct luaL_Reg nng_http_f[] = { + {"handler_alloc",lnng_http_handler_alloc}, + {NULL, NULL} +}; + +int luaopen_nng_http(lua_State *L){ + luaL_newmetatable(L,"nng.http.handler"); + luaL_newlib(L,nng_http_handler_m); + lua_setfield(L,-2,"__index"); + lua_pop(L,1); + + luaL_newlib(L,nng_http_f); + return 1; +} |
