This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMDS570LS31HDK: receiving less data in tcp_recved function

Part Number: TMDS570LS31HDK

Hi ,

In tcp client , its successfully sending the data to server and in response , the less data only receiving.I used lwip.1.4.1. I didn't make any changes in lwipopt.h , opt.h.

Below is my code in tcp_recv callbackfunction.

clientcallBackReceive(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) /*user defined function */
{
char *tempbuffer;
char storeBuffer[600];
void tcp_recved( pcb, p->tot_len);
tempbuffer=p->payload;
pbuf_free(p);
strcpy(storeBuffer,tempbuffer);


}

In this code , by using breakpoints in ccs . I can observe the tot_len as 366. but the data copied into the storeBuffer is only 201.

Please try to suggest me some solution for this .

  • Not really sure what you mean by 'less data' but please consult the documentation for lwIP on the lwIP wiki.
    We don't support lwIP here.

    The suggestion I can make is I think that you are not guaranteed to get your receive buffer 'filled' rather the receive buffer sizes are larger but the API call tells you how much data was actually received which needs to be less or same as the buffer size.