Hello,
I'm running light IP supplied in TivaWare 2.0.
TCP message is handled in the following callback:
static err_t server_recv_handler (void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
{
if ((err != ERR_OK) || (p == NULL) || (arg == NULL))
{
/* error or closed by other side? */
if (p != NULL) {
/* Inform TCP that we have taken the data. */
tcp_recved(pcb, p->tot_len);
pbuf_free(p);
}
}
host_handle_msg (pcb,p->payload,p->tot_len);
/* Inform TCP that we have taken the data. */
tcp_recved(pcb, p->tot_len);
return ERR_OK;;
}
In the handler I'm calling to "host_handle_msg " to do some work.
But it seems that if the handling of the message takes a long time and another TCP message is received, it runs over the message currently handled
What am I doing wrong ?
Thanks,
Zvika