Hi! I'm a new entry in this forum! I have to build a network peertopeer in java. how do I make a peer both client and server?
thanks
Printable View
Hi! I'm a new entry in this forum! I have to build a network peertopeer in java. how do I make a peer both client and server?
thanks
My actions:
-Open browser
-Typ in Google
-Enter as search: "p2p in java"
1e link: https://jxta.dev.java.net/
c'mon... show some effort.
You'll need to have a Socket and a ServerSocket.
I wrote the socket and ServerSocket. The problem is that I do not know how to start the ServerSocket from the socket main...
You should use separate threads. The ServerSocket blocks until it receives a connection.
Show us some code you have written and we can take it from there :)