webc v0.0.11
Write and deploy websites using the C Programming Language.
Loading...
Searching...
No Matches
webc-server.h File Reference
#include "webc-actions.h"
#include "webc-core.h"
#include "extern/httpd.h"
Include dependency graph for webc-server.h:

Go to the source code of this file.

Data Structures

union  WEBCServe
 

Functions

WEBCAPI int WEBC_ServeExported (Cstr ip, int port, Tree tree)
 
WEBCAPI int WEBC_ServeExportedRoot (Cstr ip, int port, Cstr root)
 
WEBCAPI int WEBC_ServeTree (Cstr ip, int port, Tree tree)
 
WEBCAPI void WEBC_Daemon (DaemonAction action, WEBCServe serve, Cstr ip, int port, Cstr root, Tree tree)
 
response_t * response_tree (request_t request, Tree tree)
 
int run_server_tree (server_t server, Tree tree)
 

Detailed Description

MIT License

Copyright (c) 2024 Konstantinos Despoinidis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author
KDesp73 (Konstantinos Despoinidis)
Version
0.0.1

Function Documentation

◆ WEBC_Daemon()

WEBCAPI void WEBC_Daemon ( DaemonAction action,
WEBCServe serve,
Cstr ip,
int port,
Cstr root,
Tree tree )

Make any of the serve methods a daemon

◆ WEBC_ServeExported()

WEBCAPI int WEBC_ServeExported ( Cstr ip,
int port,
Tree tree )

Serves the physical file tree exported from this program starting from the root

Parameters
portThe port to start the server from
treeThe virtual tree
Returns
int Success code

◆ WEBC_ServeExportedRoot()

WEBCAPI int WEBC_ServeExportedRoot ( Cstr ip,
int port,
Cstr root )

Serves a physical file tree starting from the root

Parameters
portThe port to start the server from
rootThe root directory to start serving from
Returns
int Success code

◆ WEBC_ServeTree()

WEBCAPI int WEBC_ServeTree ( Cstr ip,
int port,
Tree tree )

Serves a the virtual tree created by the user without exporting it

Parameters
portThe port to start the server from
rootThe root directory
Returns
int Success code