cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
lwip.h
Go to the documentation of this file.
1
53#ifndef __CWIST_SYS_PORT_LWIP_H__
54#define __CWIST_SYS_PORT_LWIP_H__
55
56#include <cwist/sys/app/app.h>
57
58#include <stdbool.h>
59#include <stddef.h>
60#include <stdint.h>
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
76
79
82
88
97
103
110
127cwist_lwip_tls *cwist_lwip_tls_create(const unsigned char *cert, size_t cert_len,
128 const unsigned char *key, size_t key_len);
129
135
136#ifdef __cplusplus
137}
138#endif
139
140#endif /* __CWIST_SYS_PORT_LWIP_H__ */
void cwist_lwip_tls_destroy(cwist_lwip_tls *tls)
Free a TLS context. Close every server using it first.
Definition lwip.c:841
struct cwist_lwip_server cwist_lwip_server
Opaque listener handle returned by cwist_lwip_listen().
Definition lwip.h:81
void cwist_lwip_close(cwist_lwip_server *srv)
Stop listening and abort every open connection, then free srv.
Definition lwip.c:774
cwist_lwip_server * cwist_lwip_listen(cwist_app *app, const cwist_lwip_config *cfg)
Bind a listening tcp_pcb on cfg->port (any address) and serve app on it.
Definition lwip.c:729
struct cwist_lwip_tls cwist_lwip_tls
Opaque TLS server context: certificate chain, key, DRBG and mbedTLS config.
Definition lwip.h:78
cwist_lwip_tls * cwist_lwip_tls_create(const unsigned char *cert, size_t cert_len, const unsigned char *key, size_t key_len)
Create a TLS server context from a certificate chain and private key.
Definition lwip.c:804
void cwist_lwip_config_init(cwist_lwip_config *cfg)
Fill cfg with the defaults documented on cwist_lwip_config.
Definition lwip.c:712
size_t cwist_lwip_active_connections(const cwist_lwip_server *srv)
Number of connections the server currently holds open.
Definition lwip.c:791
Main Application Context.
Definition app.h:155
Listener settings; start from cwist_lwip_config_init().
Definition lwip.h:67
uint16_t port
Definition lwip.h:68
struct cwist_lwip_tls * tls
Definition lwip.h:74
bool keep_alive
Definition lwip.h:73
uint32_t idle_timeout_ms
Definition lwip.h:72
size_t max_body_bytes
Definition lwip.h:71
uint16_t max_conns
Definition lwip.h:69
size_t max_header_bytes
Definition lwip.h:70
Core Application Structure and Lifecycle Management.