Solved

Continually listening multicast receiver

Posted on 2004-08-27
1
204 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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…

770 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