Can anyone give me a sample java socket programming for doing a peer to peer for 3 systems?
Posted
by
Sadesh Kumar N
on Stack Overflow
See other posts from Stack Overflow
or by Sadesh Kumar N
Published on 2012-09-12T02:49:52Z
Indexed on
2012/09/12
3:38 UTC
Read the original article
Hit count: 149
I am doing an university project. I need some sample programs on peer to peer programs in java socket programming. Every where people are telling to add a server socket in the client program.
I am in a confusion. Can a single program having server socket and client socket will do or i have to create two programs of one initiating a system and another peer program running thrice to solve the problem. or
i need to create three programs for three peer systems. I am not clear on the architecture of building peer to peer programs using java sockets. Can some one help me giving a simple program on how to create a peer to peer connection between three systems.
I know how to do a socket program for client server model and clear on the concept. But creating a peer to peer architecture sounds complex for me to understand.
I also referred this thread. developing peer to peer in java
The person commented second says" To make peer2peer app each client opens server socket too. When client A wishes to connect to client B it just connects to its socket. "
Need some more sample and an explanation on how peer to peer java socket program works I dont want any external api like jxta to do this task. I need a clear picture on how it works alone with an example.
© Stack Overflow or respective owner