picow-http 0.12.1-4-g9d4fd13
HTTP server for the Raspberry Pi PicoW
|
HTTP server configuration. More...
#include </builds/korneliuszo/picow_http/include/picow_http/http.h>
Data Fields | |
struct ntp_cfg | ntp_cfg |
const ip_addr_t * | ipaddr |
unsigned | idle_tmo_s |
unsigned | send_tmo_s |
uint16_t | port |
uint8_t | listen_backlog |
enum lwip_ip_addr_type | ip_type |
bool | tls |
Configuration of the HTTP server used at startup by http_srv_init().
Struct members ipaddr
and ip_type
, which configure the IP address at which the server listens, use data types from lwIP for IP address handling. To configure a listen address that differs from the default, use one of the mechanisms defined in lwIP's ip_addr.h
, ip4_addr.h
and/or ip6_addr.h
For example, to listen only at a specific IPv4 address (perhaps because a static IPv4 address has been configured at the router for the PicoW's MAC address):
A simple and common solution is for the server to listen at any IPv4 or IPv6 address assigned to the PicoW, using IP_ADDR_ANY
for the ipaddr
member and IPADDR_TYPE_ANY
for ip_type
. This is the configuration set by http_default_cfg(), so it requires no further modification by application code.
unsigned server_cfg::idle_tmo_s |
Idle connection timeout in seconds.
enum lwip_ip_addr_type server_cfg::ip_type |
Listen at an IPv4 or IPv6 address, or both.
const ip_addr_t* server_cfg::ipaddr |
IP address at which the server listens.
uint8_t server_cfg::listen_backlog |
Maximum length of the listen queue for incoming connections.
struct ntp_cfg server_cfg::ntp_cfg |
Configuration of NTP time synchronization
uint16_t server_cfg::port |
Port at which the server listens.
unsigned server_cfg::send_tmo_s |
Network send timeout in seconds.
bool server_cfg::tls |
true iff this is the configuration of a TLS server.