Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created a client server environment using Socket programming. now i want to convert it into peer to peer network. How can i do it. I found an answer from a site that i can call ServerSocket class from one client and socket class from another client. Can i create a peer to peer environment using this process.Is there any other way to implement it? i am using java in my project.
Posted

1 solution

Peer to peer just means that each system can act as client or server, so you need to set each machine to listen on the port that they use to communicate, and switch to server mode when it receives a connection. The other system will become a client when it receives some command from the user.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900