peer 2 peer communication without using serversocket in tcp

S

Sudheer

How to do peer to peer communication using TCP sockets in JAVA,
without using ServerSockets.
I think we can do it with UDP sockets,but I wanna do it with TCP
sockets.
Its like I wanna implement a distributed system, where there is no
server acting.
Appreciate your help.
 
J

Jordan Humber

I'm not sure if this answers your question, but anyway...

For my univeristy dissertation I created a Peer-to-Peer database system
using Java, which had no servers running.

However, each client had a permanent ServerSocket listening in a separate
thread, which acted upon all info sent to the client.
I can't see another way of doing this, as this is what enables a client to
listen.

My advice would be to stop thinking of a ServerSocket as a "server", and
start thinking of it as a "listener".

HTH,

Jordan
 
R

Roedy Green

How to do peer to peer communication using TCP sockets in JAVA,
without using ServerSockets.

I don't see how that is possible. One side has to sit there waiting
for a connection to arrive from somewhere else. It can still be
symmetrical.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top