receiving multicast packets

Posted on 2006-05-16
Medium Priority
Last Modified: 2010-04-21
Let's say my application wants to receive two different multicast streams.  One is broadcast to and one to

I have two different sockets (on different threads) which go through the following process:
   setsockopt() // to allow binding on the same port
   bind() // bind to port 9020
   setsockopt() // to join the multicast group for the multicast address we want to listen to
   recvfrom() // call this in a loop to get our multicast packets

The problem I'm having is that each socket is receiving packets from BOTH multicast groups!  Shouldn't the socket only receive packets from the multicast address that is joined to via setsockopt?

Also it should be noted that if the two multicast streams I'm receiving are on different ports, then this problem doesn't exist.
Question by:lwinkenb

Expert Comment

ID: 16703886
can you post the snippet of the sequence so I can look at the docs......I haven't written code listening to
multicast in a long time...

Just wanna check to see what you're doing...

If you have a test program, that would be even better!!


Author Comment

ID: 16705708
I ended up figuring out the problem.  As it turns out, I had to bind to the multicast address in order to only receive those multicast packets.  What threw me off was that all the example code I saw always bound to INADDR_ANY.

Accepted Solution

ee_ai_construct earned 0 total points
ID: 16877467
Closed, 500 points refunded.
Community Support Moderator
replacement part #xm34

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question