From 4e8baff3b76ee5ff24da13a8e7cf2d220c2aa35d Mon Sep 17 00:00:00 2001 From: jow Date: Mon, 28 May 2012 00:52:24 +0000 Subject: [package] 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@31931 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- uhttpd-lua.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'uhttpd-lua.h') diff --git a/uhttpd-lua.h b/uhttpd-lua.h index 2d2f73c..9a10933 100644 --- a/uhttpd-lua.h +++ b/uhttpd-lua.h @@ -1,7 +1,7 @@ /* * uhttpd - Tiny single-threaded httpd - Lua header * - * Copyright (C) 2010 Jo-Philipp Wich + * Copyright (C) 2010-2012 Jo-Philipp Wich * * 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 -- cgit v1.2.1