Files
logicog 984831620c Use multiple concurrent TCP connections
This uses multiple concurrent TCP connections by making the state
of the connection including the output buffer a part of the application
data. This leads to the buffer, to be sent length of data and the already
sent data to be part of that state and must be handed over to functions
that generate data. At this point this leads to an overuse of OSEG and DSEG
memory space so further work needs to be done on tuning the code.
Putting it into a branch for now.
2025-08-06 17:00:14 +02:00

29 lines
823 B
C

#ifndef __HELLO_WORLD_H__
#define __HELLO_WORLD_H__
/* Since this file will be included by uip.h, we cannot include uip.h
here. But we might need to include uipopt.h if we need the u8_t and
u16_t datatypes. */
#include "uipopt.h"
/* Next, we define the uip_tcp_appstate_t datatype. This is the state
of our application, and the memory required for this state is
allocated together with each TCP connection. One application state
for each TCP connection. */
typedef struct httpd_state {
uint8_t tstate;
uint8_t outbuf[2048];
uint16_t slen;
uint16_t o_idx;
} uip_tcp_appstate_t;
/* Finally we define the application function to be called by uIP. */
void httpd_appcall(void);
#ifndef UIP_APPCALL
#define UIP_APPCALL httpd_appcall
#endif /* UIP_APPCALL */
void httpd_init(void) __banked;
#endif