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 8141567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:33:14+00:00 2026-06-06T12:33:14+00:00

I have a college project where I need to extend an existing spreadsheet application

  • 0

I have a college project where I need to extend an existing spreadsheet application (CleanSheets – open source).

Right now, it’s just a simple spreadsheet application. What I was asked to implement is a menu option that allows a user to share a sheet (i.e. the user selects ‘share a sheet’ – it’s the current one – and then selects the area that they wish to share: A1:A9, for example). Then they can specify a local port and the share is created.

The other users who wish to connect to that share will have to know the machine’s IP and the port to connect. Once they input that info under a menu option called ‘join a shared sheet’ then that shared area will appear in their current sheet, and they are free to edit and view what others are typing in those cells.

Everyone has read/write access – that must be controlled by threads (because we can have 1 person sharing and 3 peers connected to that sheet, all viewing the changes and making their own). Multiple exclusion will have to be guaranteed (this can be done with Semaphores and/or Reentrantlocks).

The sharing implementation has to implemented in a peer to peer architecture.

Now my question is: how to I start developing with sockets in Java? I’ve read some documentation in Java, especially about JXTA, but that’s most likely not what I need. I don’t need a complex P2P application, just that sharing ability.

I’m assuming I need to use UDP (because TCP is mostly server-client, and anyone can be a server or a client here) and I don’t need packet control. I already know about sockets in C. Which classes should I use in Java related to sockets?

  • 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-06T12:33:16+00:00Added an answer on June 6, 2026 at 12:33 pm

    java.io and java.net have some useful classes you might want to look at. This is a pretty simplified example because I’ve ignored catching/throwing but hopefully it’ll sort of show what you can do for tx/rx.

    write bytes ought to be able to take in something serializable.

    Send data:

    // create connection
    Socket cs = new Socket(<dest-hostname>, <port-num>);
    DataOutputStream ds = new DataOutputStream(cs.getOutputStream() );
    
    // send stuff
    ds.writeBytes("is this thing on?");
    
    // close socket and stream
    cs.close();
    cs = null;
    ds = null;
    
    Receive data:
    ServerSocket listenSocket;
    Socket s = listenSocket.accept();
    BufferedReader receivedThing = new BufferedReader( new InputStreamReader( s.getInputStream() ) );
    
    //assuming its plaintext
    String msg = receivedThing.readLine();
    
    // close the socker/serversocket
    

    hope this helps.

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

Sidebar

Related Questions

I have a project idea for my college project to develop an android application
I have developed an application as my college project using Visual Studio 2005 and
I have just completed a project as part of a college degree. However I
I'm doing a project for college and have create a panel with a simple
For my college project, I want to create a simple application server in C
I have to parallelize some c++ application for my college project. But, I could
I have a college project in which I need to create a program which
I am designing an online accounting system as a college project. I have got
Ok, I'm working on a php college project, and I have to let students
I have a college project that I want to do as 3 Tier Winform

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.