I am making an application that shall allow users to see what someone else on the network is editing.The libraries i have googled so far have client to server and not client to client.What library in java can i use instead of writing one from scratch?.
Share
The way TCP and UDP work (I guess you want to use these protocols and create your own on top of them) is that a host have to contacts another to exchange information. At the end, there is always programs listening (probably what you refer as a server) and programs initiating connections (client).
Note that both programs can run on each node, as it is usually the case in peer to peer applications (they may even run in the same executable).
Based on the application you are describing in your question, a simple approach could be that each node runs a server application listening for notification of people starting or stopping editing, while the client (node initiating connections) notify all interested servers when a user starts editing. In order to do that, clients will have to keep a list of all potential writers on the network. To create and maintain this list of nodes accross a LAN, the best approach would be to implement a discovery protocol like Zeroconf.