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
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
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
Please use [highlight=Java] code [/highlight] tags when posting your code.
Forum Tip: Add to peoples reputation by clicking the button on their useful posts.