I am running a sample program, which does the following:
1. Create a socket.
2. Bind to a multicast addr.
3. setsockopt for IP_ADD_MEMBERSHIP
4. Receive some data from the socket.
5. Close the socket.
6. Repeat step 1 to 5.
A server is running, which sends the data onto this given multicast address.
The issue is :
If multicast addr is 220.127.116.11 then this program works fine, else for any other multicast addr (18.104.22.168/3, 239.255.*.*), this program runs fine till step 5. But after closing the socket when socket is restarted,all the socket calls return success, but it gets blocked on recvfrom() call (i.e. no data is received, though data is being transmitted from the server).