[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

discovery of client apps on a network

Posted on 2004-09-30
3
Medium Priority
?
250 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
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Loops Section Overview

873 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