Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8518295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:56:28+00:00 2026-06-11T05:56:28+00:00

I am doing an university project. I need some sample programs on peer to

  • 0

I am doing an university project. I need some sample programs on peer to peer programs in Java socket programming. Everywhere people are saying to add a server socket in the client program.

Would a single program having server socket and client socket do or do I have to create two programs of one initiating a system and another peer program running thrice to solve the problem?

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 to this thread.

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 don’t want any external API like jxta to do this task. I need a clear picture on how it works.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:56:29+00:00Added an answer on June 11, 2026 at 5:56 am

    Can a single program having server socket and client socket will do

    Yes. In fact, that is the normal way to implement a P2P application.

    But creating a peer to peer architecture sounds complex for me to understand.

    There is nothing particularly complicated. A peer-to-peer program is really just a client/server program that can fulfil either role. And the “architecture” word doesn’t really add much here because there is no such thing as a generic “one size fits all” peer-to-peer architecture. The label “peer-to-peer” is really about the general characteristics of the system rather than about any specific architecture, framework or API. (Though frameworks and APIs do exist …)

    However, I came across this introduction that includes some example code in Java. I don’t know if this approaches the problem starting at the socket level, but to be honest if you know how to develop socket-level client / server AND you understand concurrent programming, it is straight-forward programming to put the two together to give you simple P2P.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a Java software-project at my university that mainly is about storing data-sets
For a little university project i'm doing, i need to extract code samples from
For this university project I'm doing (for which I've made a couple of posts
I'm doing a project on filesystems on a university operating systems course, my C
I've been spending some time doing JavaCC parser generation for assignments at University and
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
For university project I'm rolling out some cloud document editor. One of the features
I am doing a project in the university which requires running of multiple instances
For our eLearning project in our university, we are using Java applets to show
I'm just doing some University related Diffie-Hellman exercises and tried to use ruby for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.