Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

discovery of client apps on a network

Posted on 2004-09-30
3
Medium Priority
?
248 Views
Last Modified: 2010-04-17
I have a simple Asynchronous Server and Client application.  Is there a way that I can scan the local network and discover which clients are available and which aren't?  Something like a broadcast request?
0
Comment
Question by:bshervey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:KeithWatson
ID: 12193718
IP multicast allows you to broadcast messages to anyone listening to the same multicast group. It requires a multicast-enabled routes; most are these days, at least in an internal network.

There is some example code at this site:

http://www.smotricz.com/kabutz/Issue028.html
0
 
LVL 3

Accepted Solution

by:
Validor earned 750 total points
ID: 12194592
Mailslots also allow you to broadcast to all machines.  Each client will need to set up a mailslot to receive a mailslot message.  Mailslots are unidirectional and delivery is not guaranteed.

You can also try a Class C TCP network scan, where you try to connect to all IP addresses in your class C (which is the 172.10.10. part of the server machine's IP address if it is 172.10.10.200 for example).  So if the client is listening on a socket port, the server could attempt 255 connections, from 172.10.10.1 to 172.10.10.255.  Any connection made would indicate a listening client.
0
 
LVL 3

Expert Comment

by:aravindtj
ID: 12201444
Hi,
   In your application, Open a MultiCast port on a particular multicast address.
   In that multicast address, just listen for connection.
   Whenever you want discover, just send a packet on the multicast address.
   All the other applications will get the packet and must reply some data back to you.
   So, whenever you are getting a reply, you can get taarget machines IP address.
   Thus, keep a hash table to store recieved host IP address.[duplications will be avoided.]
   You must keep in mind to avoid local loopback. ie, your own multicast packet will be back to you.
    To avoid this, use setsockopt(.....) function.

Hope this may help you.

all the best.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

618 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