lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] HTTP questions`


From: Trampas Stern
Subject: [lwip-users] HTTP questions`
Date: Mon, 23 Dec 2019 11:45:36 -0500

I am using a httpd.c example code from an old version of LWIP.  I am working to understand a few things and could use some help. 

From what I understand when a new connection happens the http_accept() function is called:

pcb = tcp_new();
tcp_bind(pcb, IP_ADDR_ANY, 80);
pcb = tcp_listen(pcb);
tcp_accept(pcb, http_accept);

In the http_accept() we setup the callback to the call http_recv() when a packet comes in. 
/* Tell TCP that we wish to be informed of incoming data by a call
to the http_recv() function. */
tcp_recv(pcb, http_recv);
tcp_err(pcb, http_conn_err);
tcp_poll(pcb, http_poll, 8);

So when I send a file via POST, I am getting a call to http_recv for the first packet of data.  However since the file is bigger than the TCP/IP buffer I assume http_recv() would be called again for the next packet and I do not seem to get a second call to the http_recv().  I was wondering if I was missing something?

Thanks
Trampas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]