119 HttpCmdThreadPoolIntf super;
120 DoubleList idleThreadList;
121 DoubleList runningThreadList;
122 DoubleList pendingJobList;
149#define LThreadMgr_canRun(o) ! DoubleList_isEmpty(&(o)->idleThreadList)
158#define LThreadMgr_enableHttpPool(o, server) \
159 HttpServer_setThreadPoolIntf(server, (HttpCmdThreadPoolIntf*)o)
178 int threads, lua_State* L,
int allowCreate);
211int lGetStdSockOptions(lua_State* L,
int tabIx,
const char** intf,
212 BaBool* ipv6, BaBool* secure);
214void lsharkssl_unlock(lua_State *L,SharkSsl* super);
215SharkSsl* lsharkssl_lock(
216 lua_State *L,
int tabIx,SharkSsl_Role role,SharkSsl* lockedShark);
218int pushCertificate(lua_State *L,
SoDispCon* con);
219int pushCiphers(lua_State *L,
SoDispCon* con);
220int calcTabSize(lua_State* L,
int ix);
222char* extractTab(
const char* tab, lua_State* L,
int ix,
225#define HTTPCLIENT "HTTPCLIENT"
227#define toHttpClient(L,ix) (struct HttpClient*)luaL_checkudata(L,ix,HTTPCLIENT)
229#define BACERTSTORE "BACERTSTORE"
232#define toCertStore(L,ix) (SharkSslCertStore*)luaL_checkudata(L,ix,BACERTSTORE)
void balua_http(lua_State *L)
Install the httpc Lua bindings.
void balua_crypto(lua_State *L)
Install the crypto Lua bindings.
void balua_sharkssl(lua_State *L)
Install the SharkSSL Lua bindings.
void balua_luaio(lua_State *L)
Install the LuaIo Lua bindings.
void balua_tracelogger(lua_State *L, struct LThreadMgr *tmgr)
Install the TraceLogger Lua bindings.
void balua_socket(lua_State *L)
Install the socket Lua bindings.
void balua_forkpty(lua_State *L)
Install the forkpty Lua bindings.
void balua_relsocket(lua_State *L)
When the socket Lua bindings are installed and the server application implements a gracefully system ...
ThreadPriority
Thread priority list.
Definition: ThreadLib.h:58
BA_API ThreadJob * ThreadJob_lcreate(size_t size, ThreadJob_LRun lrun)
Create a thread job designed to execute Lua code.
void(* ThreadJob_Run)(struct ThreadJob *tj, struct LThreadMgr *mgr)
Generic ThreadJob callback.
Definition: lxrc.h:101
struct ThreadJob ThreadJob
A thread job created by ThreadJob_create or ThreadJob_lcreate.
BA_API void LThreadMgr_constructor(LThreadMgr *o, HttpServer *server, ThreadPriority priority, int stackSize, int threads, lua_State *L, int allowCreate)
Initialize the Thread Pool.
BA_API int LThreadMgr_run(LThreadMgr *o, ThreadJob *tj)
This function sends a thread job to an available idle thread, or queues the job if no threads are cur...
struct LThreadMgr LThreadMgr
The global instance created by C code or a dynamic instance created by ba.thread.create
BA_API void LThreadMgr_destructor(LThreadMgr *o)
This function terminates the Thread Pool and waits for all threads to become idle before returning.
BA_API ThreadJob * ThreadJob_create(size_t size, ThreadJob_Run run)
Create a generic thread job.
void(* ThreadJob_LRun)(struct ThreadJob *tj, int msgh, struct LThreadMgr *mgr)
ThreadJob callback designed for calling Lua code using pcall.
Definition: lxrc.h:110
A container for key/value pairs that is used when setting custom HTTP headers and/or when setting URL...
Definition: HttpClient.h:88
The HTTP(S) "C" client library implementation conforms to the HTTP/1.1 standard, RFC 2616.
Definition: HttpClient.h:190
The Web Server.
Definition: HttpServer.h:2864
The global instance created by C code or a dynamic instance created by ba.thread.create
Definition: lxrc.h:118
lua_State * Lg
Global state.
Definition: lxrc.h:124
int runningThreads
Threads currently running.
Definition: lxrc.h:125
int pendingJobs
Jobs queued.
Definition: lxrc.h:126
HttpServer * server
The server object.
Definition: lxrc.h:123
int isDynamic
if created via ba.thread.create()
Definition: lxrc.h:127
int threads
number of threads
Definition: lxrc.h:130
Contains information about the physical socket connection.
Definition: SoDispCon.h:112
A thread job created by ThreadJob_create or ThreadJob_lcreate.
Definition: lxrc.h:137
lua_State * Lt
Thread state.
Definition: lxrc.h:141