|
From: | Noam Weissman |
Subject: | Re: [lwip-users] UDP bind error due to address and port reuse |
Date: | Wed, 7 Dec 2016 10:56:08 +0000 |
Hi, Dirk, if the application is creating a different port on every reply you cannot rely on that. You must have control over the data Surya, Yes you can listen on a single UDP but you need to get some kind of data that will let you know who Responded. If you have a processing issue, meaning you send 5 messages and applications send the replies more or less at the same time, you may need to first to add the received data to some kind of
temporary buffering mechanism and in the background process one message at a time. The above buffering mechanism ensures that you do not loos any data…
This is how I would have done it. BR, Noam. From: lwip-users [mailto:lwip-users-bounces+address@hidden
On Behalf Of Dirk Ziegelmeier Use one UDP PCB, bind it to IPADDR_ANY and port x. Use udp_sendto() to send to any IP/port combination.
[create new pbuf with response] udp_sendto(pcb, response_pbuf, addr, port); } Dirk |
[Prev in Thread] | Current Thread | [Next in Thread] |