diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-05-28 00:52:24 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-05-28 00:52:24 +0000 |
commit | 022fa36b40b02248436584cf0f71bb26d79eb644 (patch) | |
tree | 8cb1f4d8f1ab4f1aee4538621684a188101c867c /package/uhttpd/src/uhttpd-lua.h | |
parent | 8039a1bbb2056019458b5179108e399d0fcb0622 (diff) | |
download | upstream-022fa36b40b02248436584cf0f71bb26d79eb644.tar.gz upstream-022fa36b40b02248436584cf0f71bb26d79eb644.tar.bz2 upstream-022fa36b40b02248436584cf0f71bb26d79eb644.zip |
uhttpd: - rewrite large parts of the server, use uloop event driven structure - support concurrent requests and make the upper limit configurable - implement initial version of HTTP-to-ubus JSON proxy and session.* namespace - add compile time support for debug information - code style changes - bump package revision
SVN-Revision: 31931
Diffstat (limited to 'package/uhttpd/src/uhttpd-lua.h')
-rw-r--r-- | package/uhttpd/src/uhttpd-lua.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/package/uhttpd/src/uhttpd-lua.h b/package/uhttpd/src/uhttpd-lua.h index 2d2f73c1c2..9a10933fc7 100644 --- a/package/uhttpd/src/uhttpd-lua.h +++ b/package/uhttpd/src/uhttpd-lua.h @@ -1,7 +1,7 @@ /* * uhttpd - Tiny single-threaded httpd - Lua header * - * Copyright (C) 2010 Jo-Philipp Wich <xm@subsignal.org> + * Copyright (C) 2010-2012 Jo-Philipp Wich <xm@subsignal.org> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,12 +32,17 @@ #define UH_LUA_ERR_PARAM -3 -lua_State * uh_lua_init(const struct config *conf); - -void uh_lua_request( - struct client *cl, struct http_request *req, lua_State *L -); +struct uh_lua_state { + int rfd; + int wfd; + struct client *cl; + char httpbuf[UH_LIMIT_MSGHEAD]; + int content_length; + bool data_sent; +}; +lua_State * uh_lua_init(const struct config *conf); +bool uh_lua_request(struct client *cl, lua_State *L); void uh_lua_close(lua_State *L); #endif |