cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
endpoint_opts.h File Reference

Endpoint-level behavior flags for CWIST apps. More...

#include <stdbool.h>
#include <stdint.h>
Include dependency graph for endpoint_opts.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CWIST_DYNAMIC   (1u << 0)
 
#define CWIST_ENDPOINT_FIXED   (1u << 1)
 
#define CWIST_ENDPOINT_PUBLIC_FIXED   (1u << 3)
 
#define CWIST_ENDPOINT_FILE   (1u << 2)
 
#define CWIST_ENDPOINT_DEFAULT   (CWIST_DYNAMIC)
 Default option for new endpoints.
 

Typedefs

typedef uint32_t cwist_endpoint_opt_t
 Bitmask type controlling endpoint behavior.
 

Functions

bool cwist_endpoint_has_extern (cwist_endpoint_opt_t opts, cwist_endpoint_opt_t flag)
 Out-of-line cwist_endpoint_has(), for callers that cannot use a static inline function, such as bindings generated from this header.
 

Detailed Description

Endpoint-level behavior flags for CWIST apps.

Definition in file endpoint_opts.h.

Macro Definition Documentation

◆ CWIST_DYNAMIC

#define CWIST_DYNAMIC   (1u << 0)

Immediate execution with no special tuning (default).

Definition at line 21 of file endpoint_opts.h.

◆ CWIST_ENDPOINT_DEFAULT

#define CWIST_ENDPOINT_DEFAULT   (CWIST_DYNAMIC)

Default option for new endpoints.

Definition at line 37 of file endpoint_opts.h.

◆ CWIST_ENDPOINT_FILE

#define CWIST_ENDPOINT_FILE   (1u << 2)

Serve large files using OS-specific zero-copy fast paths.

Definition at line 34 of file endpoint_opts.h.

◆ CWIST_ENDPOINT_FIXED

#define CWIST_ENDPOINT_FIXED   (1u << 1)

Hint that the route's response is request-invariant.

This compatibility hint does NOT activate automatic HTTP caching. Every request uses ordinary dispatch in classic and C1M (see docs/fixed-cache-status.md).

Definition at line 29 of file endpoint_opts.h.

◆ CWIST_ENDPOINT_PUBLIC_FIXED

#define CWIST_ENDPOINT_PUBLIC_FIXED   (1u << 3)

Inert since the public FIXED cache was removed (#194); kept defined so code that sets it keeps compiling. See docs/fixed-cache-status.md.

Definition at line 32 of file endpoint_opts.h.

Typedef Documentation

◆ cwist_endpoint_opt_t

Bitmask type controlling endpoint behavior.

Flags can be OR-ed together to hint caching or streaming strategies for a given route.

Definition at line 18 of file endpoint_opts.h.

Function Documentation

◆ cwist_endpoint_has_extern()

bool cwist_endpoint_has_extern ( cwist_endpoint_opt_t  opts,
cwist_endpoint_opt_t  flag 
)

Out-of-line cwist_endpoint_has(), for callers that cannot use a static inline function, such as bindings generated from this header.

Returns
true when any bit of flag is set in opts.

Definition at line 2352 of file app.c.

References cap.