lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] HTTP Auth, LWIP connection management and FIN packets


From: Sergio R. Caprile
Subject: Re: [lwip-users] HTTP Auth, LWIP connection management and FIN packets
Date: Wed, 2 Mar 2016 11:38:30 -0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

1) No I'm not. I've had to completely rewrite the HTTP parser, it wasn't
fully needed because it didn't have to parse headers from the client and
so it was a simple implementation that parsed over and over the same
unless everything came on the same pbuf.
I'm suggesting because I've been there. It is your choice however. You
are free to do whatever you want.

3) In tcp_recv() callback, you only call tcp_close() when you get an
indication of a connection close:
err_t myrecv(void *arg, struct tcp_pcb* pcb, struct pbuf *p, err_t err)
{
        if ((p == NULL) || (err != ERR_OK)){
Otherwise, if you decide to close on reception, you should get data first:
        tcp_recved(pcb, p->tot_len);
        pbuf_free(p);
Do you ?

If you are on the client side, receiving, you mentioned you called lwIP
from within interrupts and main context. You must not do that.





reply via email to

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