>Please correct me if i am wrong.
No, you are not. I wasn't sure if the code is complete.
I'm not sure if it could help, try to add a call back function to your
TCPConnection_start function
struct dataname
{
int length;
char bytes[MAX_NAME_SIZE];
};
static void my_tcp_err(void *arg, err_t err)
{
struct dataname * dataname;
dataname = (struct dataname*)arg;
printf("\r\n Error occured");
mem_free(dataname);
}
>>>> void TCPConnection_start(void)
>>>> {
>>>> struct ip_addr DestIPaddr;
>>>>
>>>> /* create new tcp pcb */
>>>> pcb = tcp_new();
>>>> if (pcb != NULL)
>>>> {
>>>> IP4_ADDR( &DestIPaddr, DEST_IP_ADDR0, DEST_IP_ADDR1,
>>>> DEST_IP_ADDR2,
>>>> DEST_IP_ADDR3 );
>>>>
tcp_err(pcb, my_tcp_err);
>>>> /* connect to destination address/port */
>>>>
tcp_connect(pcb,&DestIPaddr,DEST_PORT,TCPConnection_Established);
>>>> }
>>>> }
>>>>
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users