I’m looking for a way to connect two or more client sockets directly without the need for a server application running. I’ve searched for several ways and the best I could find is JXTA P2P protocol. I just want to know if there are any alternatives other than JXTA.
The basic functionalities of the clients interacting is (1) the ability for a client to send messages to all other clients and (2) request some file available that some other client has.
It’s worth noting that I’ll be running multiple instances of the application on my computer (localhost), so having NATs or firewalls aren’t issues.
You want multicast sockets.
This question appears to have all the code you need to implement them.
Note that this is only appropriate for applications running on a LAN, which you say you have. Supporting multicast across different networks (and usually across different segments of a single large network) requires router support.