I have written one client application , which uses the mdnsreponder for some service discovery . I have one requirement that my client IP will get change very frequently. whenever there is a change in the IP I need to do the discovery again . So I have written simple test application which will change the IP for every 1 min and do the discovery .
Everything works fine but after few IP changes(some 7-10 times changed) it gives below socket error .
(below is the error code of sendto socket function in the mdnsresponder code)
mdnsplatformsend udp got error 22 .
After that my request will not put it on the interface with new IP.
Again I have to restart my application, then only it works...
Can somebody help to figure out the problem, why does it stop after a few trials?
Please re check the parameters of sendto function that you are passing. This error can be occurred when the socket binding is lost. That means the address where the socket is bound has changed or invalid. The error can also be caused because of wrong size of the address structure that you are passing.