Dear Simon, Please do not confuse me :-)
" you get the port of the remote application and use sendto() to respond" The above is not what was questioned. Application at embedded side sends the same message to several recipients from the same port. Depending on the recipient design that you have NO CONTROL of ... the recipient will send back something to the same port at the embedded side. What I wrote was, that if you have no control over the recipients and you do not know if they use one port for send and receive or two separate ports for send and receive. Or whatever else can go wrong... So you cannot rely on recipient port in order to know where the reply came from. You can rely on some data, an ID, or something else that will be embedded in the message that is sent back. This is what I meant. Unless Suraya can give more info on the above issue. BR, Noam. -----Original Message----- From: lwip-users [mailto:[email protected]] On Behalf Of Simon Goldschmidt Sent: Thursday, December 08, 2016 12:14 PM To: [email protected] Subject: Re: [lwip-users] UDP bind error due to address and port reuse Noam Weissman wrote: > Dirk, if the application is creating a different port on every reply you > cannot rely on that. > You must have control over the data Rely on what? Using raw recv callback (like in Dirk's example) or socket-based recvfrom() you get the port of the remote application and use sendto() to respond. Please don't confuse people ;-) Simon _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
