Solved

Continually listening multicast receiver

Posted on 2004-08-27
1
199 Views
Last Modified: 2013-12-03
I need to know if it would be OK for a multicast receiver to continually listen for data from a multicast sender.  If so, what would be the best way for me to construct the receiver?  I was thinking of the following way (see pseudocode):

/**********************************/

Create UDP socket
Construct bind structure
Bind to multicast port
Specify multicast group
Join multicast group

While loop begin
    listen and receive data using recvfrom
Continue until told to stop

Close socket when finished

/**********************************/

Is it okay to continually check for data using a while loop or would this cause problems (especially to other multicast receivers)?
And just for your info, I will be programming in C using Winsock.
0
Comment
Question by:jtrades
1 Comment
 
LVL 8

Accepted Solution

by:
mxjijo earned 250 total points
ID: 11917403

   Your basic design would definitly work.
Try to use non-blocking or async recv methods to make it more professional.

>> would this cause problems (especially to other multicast receivers)?
     No. Receiving data on one machine will NOT affect other receivers on the network.
If once a client joins the multicast group, that client will get a copy of the data no matter
whether there are other clients receiving it or not.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now