Lines Matching +full:- +full:a
5 …a C/C++ application could use CivetWeb to enable a web service and configuration interface, to add…
7 …a stand-alone executable. It can deliver static files and offers built-in server side Lua, JavaScr…
11 ------
13 There is just a small set of files to compile in to the application,
14 but if a library is desired, see [Building.md](https://github.com/CivetWeb/CivetWeb/blob/master/doc…
18 The *INL* file extension represents code that is statically included inline in a source file. Slig…
22 These files constitute the CivetWeb library. They do not contain a `main` function,
23 but all functions required to run a HTTP server.
25 - HTTP server API
26 - include/civetweb.h
27 - C implementation
28 - src/civetweb.c
29 - src/md5.inl (MD5 calculation)
30 - src/sha1.inl (SHA calculation)
31 - src/handle\_form.inl (HTML form handling functions)
32 - src/timer.inl (optional timer support)
33 - Optional: C++ wrapper
34 - include/CivetServer.h (C++ interface)
35 - src/CivetServer.cpp (C++ wrapper implementation)
36 - Optional: Third party components
37 - src/third\_party/* (third party components, mainly used for the standalone server)
38 - src/mod\_*.inl (modules to access third party components from civetweb)
41 … While all features should be accessible using the C interface, this is not a design goal of the C…
45 These files can be used to build a server executable. They contain a `main` function
48 - Stand-alone C server
49 - src/main.c
50 - Reference embedded C server
51 - examples/embedded\_c/embedded\_c.c
52 - Reference embedded C++ server
53 - examples/embedded\_cpp/embedded\_cpp.cpp
59 ------
61 By default, the server will automatically serve up files like a normal HTTP server. An embedded se…
64 - Include the C interface ```civetweb.h```.
65 - Use `mg_start()` to start the server.
66 - Use *options* to select the port and document root among other things.
67 - Use *callbacks* to add your own hooks.
68 - Use `mg_set_request_handler()` to easily add your own request handlers.
69 - Use `mg_stop()` to stop the server.
72 …- Note that CivetWeb is Clean C, and C++ interface ```CivetServer.h``` is only a wrapper layer aro…
74 - Create CivetHandlers for each URI.
75 - Register the handlers with `CivetServer::addHandler()`
76 - `CivetServer` starts on construction and stops on destruction.
77 - Use constructor *options* to select the port and document root among other things.
78 - Use constructor *callbacks* to add your own hooks.
80 Alternative quick start: Have a look at the examples embedded\_c and embedded\_cpp
84 ------
95 …a reasonable default feature set. Optional features not including in the default can be added by a…
100 …a `MG_EXTERNAL_FUNCTION_<internal_function_name>` define. For details on this mechanism, please lo…
101 …plaining your use case, to discuss if this would be an appropriate solution - in general, other cu…
105 ------
107 Lua is a server side include functionality. Files ending in .lua will be processed with Lua.
111 - `-DLUA_COMPAT_ALL`
112 - `-DUSE_LUA`
113 - `-DUSE_LUA_SQLITE3`
114 - `-DUSE_LUA_FILE_SYSTEM`
118 - src/mod\_lua.inl
119 - src/third\_party/lua-5.2.4/src
152 - src/third\_party/sqlite3.c
153 - src/third\_party/sqlite3.h
154 - src/third\_party/lsqlite3.c
155 - src/third\_party/lfs.c
156 - src/third\_party/lfs.h
162 ------
168 ------
174 - configuration options. Note that CivetWeb makes internal copies of
176 - SSL context, if any
177 - user-defined callbacks
178 - opened listening sockets
179 - a queue for accepted sockets
180 - mutexes and condition variables for inter-thread synchronization
184 some threads: a master thread, that accepts new connections, and several
186 is configurable via `num_threads` configuration option. That number puts a
188 If you embed CivetWeb into a program that uses SSL outside CivetWeb as well,
189 you may need to initialize SSL before calling `mg_start()`, and set the pre-
193 When master thread accepts new a connection, a new accepted socket (described
200 until there is space in the queue. When the master thread is blocked on a
205 Worker threads are running in an infinite loop, which in a simplified form
216 Function `consume_socket()` gets a new accepted socket from the CivetWeb socket
218 `consume_socket()` blocks and waits until a new socket is placed in the queue
227 `select()`. Since there are only a few listening sockets, there is no reason
228 to use hi-performance alternatives like `epoll()` or `kqueue()`. Worker
232 which specifies a read/write timeout on client connections.
235 A minimal example
236 ------
238 Initializing a HTTP server
258 /* Un-initialize the library */
263 A simple callback
273 "Content-Length: %lu\r\n"
274 "Content-Type: text/plain\r\n"