Dear all,

 

I have a little problem to work with a TCP- and UDP connection at the same
time. 

There are no problems when I establish the TCP connection or the UDP
connection separately.  Only if I would use a UDP connection simultaneously
with one TCP link, I could not receive all UDP frames on my  client
application. But if I close the TCP now- the UDP connection works very well
again. 

 

Ok- I thought: a resource problem. But I don't have any buffer or
udp_send() errors. 

Furthermore another point I don't understand:  If I open a second TCP
connection on another PC- all connections will work very well!! (2*TCP +
*UDP)

 

Anyone an idea??? 

 

I use  lwip 1.3.0 (ported for a LM3s89xx MCU with FreeRTOS running)

 

Following code sequence I use in my "UDP Thread" which will be woken every
10ms:

/*******************************************************/

// allocate packet buffer

p = pbuf_alloc(PBUF_TRANSPORT, (1024 + 5) * sizeof(int), PBUF_RAM);

if(p==NULL) {

   // set error...

   break;

}

 

//

// write data to p->payload here

// ...

 

// send the frame 

err =udp_send  (udp, p);

if(err != ERR_OK){

   // set error...

}

 

// De-allocate packet buffer

If(p) 

  pbuf_free(p);

/*******************************************************/

 

 

Thank you!!

Felix

 

 

_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to