TechArena Community

TechArena Community (http://forums.techarena.in/)
-   Software Development (http://forums.techarena.in/software-development/)
-   -   Detect users of a application (http://forums.techarena.in/software-development/1298449.htm)

Remedy 03-02-2010 12:39 AM

Detect users of a application
 
Hello,
I like MSN messenger but only on a LAN. I blocked a little about using ServerSocket what should I use ServerSocket instance by the program (each program running onthe network has its own ServerSocket, always on the same port, and still serverSocket.accept ()), and also an array or vector. Socket to be used to handle connections initialized from the local to the other posts? and also, how can I explore the network to detect all users who have an instance of my program launched Thanks in advance.

cyber-noob 03-02-2010 12:40 AM

Re: Detect users of a application
 
Hello,
The simplest would be to a client / server or each instance of your program connects to the server. Only the server would have a ServerSocket to manage the new connection. Your idea obviously is to create a p2p network, or everyone would connect to everyone, but I'd advise against it: it's much more complicated and in your case it does nothing.

Remedy 03-02-2010 12:45 AM

Re: Detect users of a application
 
Hello,
Yes, but it also means it takes 2 different programs, one on server and one client out, I could not have permanent server for this program (I wish I could implement it in the tears in my chest is the only area where I have connected more than 2pc together and it's filled with DHCP, proxies, firewalls ,.... short one is quickly limited) I'd like it to be relatively autonomous and intelligent (at least, able to explore the network without a server that should be set anyway)

WinDoWLoCuS 03-02-2010 12:46 AM

Re: Detect users of a application
 
Hello,
To my knowledge, even for the P2P, you need a server in the case of P2P its role is very light, since it indicates only the list of connected. Then everyone connects to everyone without going through the server. But without a server, it is virtually impossible. You can can make a list of subscribers that updates itself if all the run and the exchange for everyone. But I tell you not theoretical problems. By cons, you can be saved by noting that the P2P server need not be very intelligent, someone might even dare to imagine that it is a simple update file via FTP (and therefore even more necessary to install a java program), giving the server address of the P2P list, which gives.

Remedy 03-02-2010 12:50 AM

Re: Detect users of a application
 
Hello,
Precisely, the classical stuff I've already implemented and I wanted
try to go a little further. I have the GUI client, it remains for me to define a general communication protocol. If I summarize, clients connect to a static server, which contains the list of connected. During the first connection, I refer IDs of all connected, so that the client chooses to which person he wants to communicate. Once selected, I set about a client socket with the other person.

Linux-Us 03-02-2010 12:53 AM

Re: Detect users of a application
 
Hello,
You can point you toward a system of Chat "multicast" to have no server. The idea is quite simple. A program "client" is started and is on the multicast address that you have booked your program. When writing a message, instead of sending to a server or the client has everything, you send the message on the multicast address. When a multicast packet is intercepted by a network adapter, the battery see if the computer has registered with that address, whether it deals with the package if not ignore it.


All times are GMT +5.5. The time now is 09:48 AM.