diff options
Diffstat (limited to 'doc/man7/libweb_handler.7')
| -rw-r--r-- | doc/man7/libweb_handler.7 | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/doc/man7/libweb_handler.7 b/doc/man7/libweb_handler.7 index b9fd53f..1548b6b 100644 --- a/doc/man7/libweb_handler.7 +++ b/doc/man7/libweb_handler.7 @@ -51,9 +51,15 @@ operation. .IP \(bu 2 .IR handler_listen (3): +initializes the server on a +.I "struct handler" +object to listen on a given port. + +.IP \(bu 2 +.IR handler_loop (3): puts a .I "struct handler" -object to initialize the server and handle connections in a loop. +object to handle connections in a loop. The .IR handler_alloc (3) @@ -200,11 +206,16 @@ int main(int argc, char *argv[]) goto end; } - if (handler_listen(h, port)) + if (handler_listen(h, port, NULL)) { fprintf(stderr, "%s: handler_listen failed\en", __func__); goto end; } + else if (handler_loop(h)) + { + fprintf(stderr, "%s: handler_loop failed\en", __func__); + goto end; + } ret = EXIT_SUCCESS; @@ -220,10 +231,12 @@ end: .BR handler_alloc (3), .BR handler_add (3), .BR handler_free (3), +.BR handler_listen (3), +.BR handler_loop (3), .BR libweb_http (7). .SH COPYRIGHT -Copyright (C) 2023 Xavier Del Campo Romero. +Copyright (C) 2023 libweb contributors. .P This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by |
