|
From: | Michael Steinberg |
Subject: | Re: [lwip-users] UDP bind error due to address and port reuse |
Date: | Sat, 3 Dec 2016 20:05:21 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
Am 03.12.2016 um 17:37 schrieb Surya Chaitanya:
Hi, The scenario is something like this. I have created an array of say, 5 UDP PCB's. I'd like to bind all these 5 UDP PCB's to the same local IP address and port number combination. Isn't this posible? Like you said, if we cannot bind an IP:Port more than one time, what is the purpose of SO_REUSE and SOF_REUSEADDR flags? Aren't they for reusing a particular port:IP combination for several PCBs at the same time? Thank you. Regards, Surya
Hello Surya, Have a look at this nice explanation http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-twhich shows in detail why those options are not meant to do what you seem to be thinking (are you expecting some kind of load balancing?) on standard bsd socket behaviour. I cannot tell if the intended behaviour is different on lwip though.
Michael
[Prev in Thread] | Current Thread | [Next in Thread] |