Tool/software: Code Composer Studio
Hi,
I am trying to send the data to http server continuously by using enet_lwip example. I have the http client but after sending the first transfer the client itself closing the connection. I'm creating the http post request and after that calling the tcp_send_packet() in while loop which is in the main. It is the receving the callback and closing the connection after the first transfer.
err_t tcpRecvCallback(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err)
{
UARTprintf("Data recieved.\n");
if (p == NULL) {
UARTprintf("The remote host closed the connection.\n");
UARTprintf("Closing the connection.\n");
tcp_close(testpcb);
return ERR_ABRT;
}
else
{
UARTprintf("Number of pbufs %d\n", pbuf_clen(p));
UARTprintf("Contents of pbuf %s\n", (char *)p->payload);
}
return 0;
}
I tried it in differnet ways. if i put the tcp_setup function in a while along with post request and tcp_send_packet() then it's working by giving error code: -13. can anyone suggest me the right way to send the data continuously to the http server from http client.
Thanks
Regards
B T S S Sai Prasad

