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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:12:41+00:00 2026-05-25T16:12:41+00:00

I want to implement a program that performs communication between more than 2 computers.

  • 0

I want to implement a program that performs communication between more than 2 computers.

I will have a computer that send a query to a computer which is a server on port 2222, for example. This server will always listen to get a query. When it gets a query, it will send it to another machine which is a server on port 4444. and then a query will be run on the last machine then send back.

Illustration ::::

  1. query sender ——> first machine ( port 2222 ) ——> second machine ( port 4444 )

  2. second machine runs query

  3. second machine ( port 4444 )——> first machine ( port 2222 ) ——> query sender

Can you please tell me how I can send the received query from first machine to second machine? To be more clear how I can send a received data from any port to another machine?

Thank you very much.

  • 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-05-25T16:12:42+00:00Added an answer on May 25, 2026 at 4:12 pm

    On the first machine, simply listen on port 2222, read the incoming queries, then open a Socket to the second machine on port 4444 (the second machine is listening on port 4444), which processes the query.

    The reverse route is just the same in reverse. When the result is found, a Socket can be used to connect to the first machine, with the result, and then the first machine sends the result back out where it came from.

    Both the first and second machine will need to utilize ServerSocket (for incoming connections) as well as use the Socket class to send results back.

    As Suraf Chandran has explained, the networking api is where you need to start to understand the concepts behind this. If you’ve never done network programming before in Java, then it’s important you go through the tutorial first.

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

Sidebar

Related Questions

I want to implement a userland command that will take one of its arguments
I want to implement application settings to have them update settings that wont be
I want to implement Sphinx voice recognition API in my program that run on
I want to implement in my program functionality, which will make it able to
I want to implement a program that shows some chars moving randomly on console,
I have an existing program that has its own main loop, and does computations
I have to design and implement a program to accomplish drum stick matching (not
I want to use a temp directory that will be unique to this build.
This is what I want to accomplish for homework: Design and implement a program
I have a Java program that creates a server socket and accepts connections from

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.