I hope i understand order of calls, now i have got order like this:
//some operation on data
//close file etc.
pbuf_free(p);
hs->file = pointer_on_data;
hs->left = data_length
tcp_recved(pcb, p->tot_len);
send_data(pcb, hs);
tcp_sent(pcb, http_sent);
tcp_output(pcb);
But that dont change in appearing problem loosing some data, that can be one
sign and file like css or js make big troubles, maybe there is a solution in
somehowe slow transmition that i will send next file when there will be know
that last file had been send.
The http_sent is:
static err_t
http_sent(void *arg, struct tcp_pcb *pcb, u16_t len)
{
struct http_state *hs;
hs = arg;
if (hs->left > 0)
{
send_data(pcb, hs);
}
else
{
close_conn(pcb, hs);
}
return ERR_OK;
}
----------------------------------------------
Chcesz wiÄcej zarabiaÄ? ZmieÅ pracÄ na lepszÄ
!
http://linkint.pl/f2849
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users