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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:49:25+00:00 2026-05-26T07:49:25+00:00

I am trying to create a simple chat program using Java. I have create

  • 0

I am trying to create a simple chat program using Java. I have create TCP server that accepts multiple clients. Currently the clients message to server.

  1. How can I broadcast the message from one client to all the others?
  2. How can I pair of two clients. Send and recieve message to eachother?
  • 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-26T07:49:26+00:00Added an answer on May 26, 2026 at 7:49 am

    1.How can I broadcast the message from one client to all the others?

    Use a subscribe/notify mechanism

    2.How can I pair of two clients. Send and recieve message to eachother?

    Clients must have a server socket listening as well.

    UPDATE:
    Your server will have some sort of registry where all your clients register for notifications.
    The clients open a server socket that waits for messages.
    When a client wants to send a message then it connects to the server, sends the message and the server can either send the message to all registered clients or to a specific client that is supposed to receive the message.At this part the server connects to the client’s server socket and sends the message.
    Another option is not to open a server socket at the client, but the client does polling to see if the server has a message available

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

Sidebar

Related Questions

I am trying to create a simple chat client using the red5 media server,
Hi guys i am trying to create a simple chat server. I have installed
I'm trying to create a very simple chat application in Flex/.Net using FluorineFX but
I am trying to create a very simple chat window that simply has the
I'm trying to create a client-server program that send and receive a string (its
I'm trying to create a simple web project using Tomcat in Java. In the
I was trying to create simple program that would perform some trivial operation with
trying to create a simple slider for an input. Using a survey gem that
Im trying to create a simple callback using blocks. I have a MainViewController which
I am trying to create a simple ajax chat using JQuery and ASP.NET. My

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.