Barracuda Application Server C/C++ Reference
NO
HttpCmdThreadPool.h
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * Barracuda Embedded Web-Server
10 ****************************************************************************
11 * HEADER
12 *
13 * $Id: HttpCmdThreadPool.h 5385 2023-02-17 19:38:01Z wini $
14 *
15 * COPYRIGHT: Real Time Logic LLC, 2004-2012
16 *
17 * This software is copyrighted by and is the sole property of Real
18 * Time Logic LLC. All rights, title, ownership, or other interests in
19 * the software remain the property of Real Time Logic LLC. This
20 * software may only be used in accordance with the terms and
21 * conditions stipulated in the corresponding license agreement under
22 * which the software has been supplied. Any unauthorized use,
23 * duplication, transmission, distribution, or disclosure of this
24 * software is expressly forbidden.
25 *
26 * This Copyright notice may not be removed or modified without prior
27 * written consent of Real Time Logic LLC.
28 *
29 * Real Time Logic LLC. reserves the right to modify this software
30 * without notice.
31 *
32 * http://www.realtimelogic.com
33 ****************************************************************************
34 *
35 */
36
37#ifndef _HttpCmdThreadPool_h
38#define _HttpCmdThreadPool_h
39
40
41#include <DoubleList.h>
42#include <HttpCmdThreadPoolIntf.h>
43
45
46typedef enum {
47 HttpCmdThreadState_Idle,
48 HttpCmdThreadState_RunDir,
49 HttpCmdThreadState_Exit
50} HttpCmdThreadState;
51
52
53#ifndef __DOXYGEN__
54typedef struct
55{
56 Thread super;
57 DoubleLink node;
59 struct HttpCmdThreadPool* pool;
60 HttpCommand* cmd;
61 HttpDir* dir;
62 HttpCmdThreadState state;
63} HttpCmdThread;
64#endif
65
79typedef struct HttpCmdThreadPool
80{
81#ifdef __cplusplus
82
98 HttpServer* server,ThreadPriority priority,int stackSize);
99
113 private:
114#endif
115 HttpCmdThreadPoolIntf super;
116 DoubleList freeList;
117 DoubleList runningList;
118 SoDisp* dispatcher;
119 HttpServer* server;
120 HttpCmdThread* pool;
122
123
124
125#ifdef __cplusplus
126extern "C" {
127#endif
128BA_API void HttpCmdThreadPool_constructor(HttpCmdThreadPool* o,
129 HttpServer* server,
130 ThreadPriority priority,
131 int stackSize);
132BA_API void HttpCmdThreadPool_destructor(HttpCmdThreadPool* o);
133#ifdef __cplusplus
134}
136 ThreadPriority priority,
137 int stackSize) {
138 HttpCmdThreadPool_constructor(this, server, priority, stackSize); }
140 HttpCmdThreadPool_destructor(this); }
141#endif
142 /* end of ThreadLib group */
144
145
146#endif
HttpCmdThreadPool(HttpServer *server, ThreadPriority priority, int stackSize)
Create an instance of HttpCmdThreadPool and bind the thread pool to an instance of the HttpServer cla...
Definition: HttpCmdThreadPool.h:135
struct HttpCmdThreadPool HttpCmdThreadPool
An instance of this class provides a thread pool to an instance of the HttpServer class.
ThreadPriority
Thread priority list.
Definition: ThreadLib.h:58
~HttpCmdThreadPool()
Terminates all threads in the thread pool and deregisters the thread pool in the HttpServer instance.
Definition: HttpCmdThreadPool.h:139
An instance of this class provides a thread pool to an instance of the HttpServer class.
Definition: HttpCmdThreadPool.h:80
The HttpCommand class is a container class for the HttpRequest and HttpResponse command pair.
Definition: HttpServer.h:1818
An instance of the HttpDir class, which is a collection of zero or more resources,...
Definition: HttpServer.h:2368
The Web Server.
Definition: HttpServer.h:2864
The SoDisp dispatches any socket connection that contains data by calling the SoDispCon::execute memb...
Definition: SoDisp.h:86
A simple semaphore implementation.
Definition: ThreadLib.h:213
A simple thread class.
Definition: ThreadLib.h:241