Pharos
0.7.23
Modern Web Framework & Web App Hosting Service.
Toggle main menu visibility
Loading...
Searching...
No Matches
native_static_serve.h
Go to the documentation of this file.
1
/**
2
* @file
3
* @brief Declares native static artifact serving helpers.
4
*/
5
6
#ifndef PHAROS_NATIVE_STATIC_SERVE_H
7
#define PHAROS_NATIVE_STATIC_SERVE_H
8
9
#include "
native_connection.h
"
10
#include "
native_http_request.h
"
11
12
/** @name Native static serving helpers
13
* @{
14
*/
15
/**
16
* @brief Serves one static artifact response from a root directory.
17
* @param connection Connection receiving the response.
18
* @param root Artifact root directory.
19
* @param path Request target path.
20
* @param request Parsed request metadata.
21
* @param log_path Log path used for access and error logging.
22
* @return Final HTTP status code, or a negative value on connection write failure.
23
*/
24
int
native_serve_static_file
(
NativeConnection
*connection,
const
char
*root,
const
char
*path,
const
HttpRequest
*request,
const
char
*log_path);
25
26
/** @} */
27
#endif
native_connection.h
Declares the native connection abstraction and transport metadata helpers.
native_http_request.h
Declares the parsed HTTP request record and request parsing helpers.
native_serve_static_file
int native_serve_static_file(NativeConnection *connection, const char *root, const char *path, const HttpRequest *request, const char *log_path)
Serves one static artifact response from a root directory.
Definition
native_static_serve.c:24
HttpRequest
Parsed HTTP request fields extracted from a native connection.
Definition
native_http_request.h:16
NativeConnection
Accepted client connection and its resolved transport metadata.
Definition
native_connection.h:24
src
native_runtime
c
native_static_serve.h
Generated by
1.17.0