mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-02 13:20:51 +00:00
Add mg_hello()
This commit is contained in:
1 parent
9a1e41e1fa
commit
7ab81d3805
5 files changed
+76
-1
No files matched your search
@@ -760,6 +760,23 @@ Return value: `true` if data has been sent, `false` otherwise
|
||||
|
||||
Usage example: see [examples/multi-threaded](https://github.com/cesanta/mongoose/tree/master/examples/multi-threaded).
|
||||
|
||||
### mg\_hello()
|
||||
|
||||
```c
|
||||
void mg_hello(const char *url);
|
||||
```
|
||||
|
||||
A convenience function that starts a simple web server on a given listening
|
||||
URL. This function does not return until a "/quit" request is received. A
|
||||
server handles the following URIs:
|
||||
|
||||
- `/quit` - quit the server, and exit the function
|
||||
- `/debug` - set debug level, expect `{"level": 3}` as a POST payload
|
||||
- For all other URIs, `hi` is returned as a response
|
||||
|
||||
Parameters:
|
||||
- `url` - a listening URL, for example `http://0.0.0.0:8000`
|
||||
|
||||
|
||||
## HTTP
|
||||
|
||||
|
||||
Reference in new issue
Block a user