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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:55:00+00:00 2026-06-05T08:55:00+00:00

I am currently writing a chatroom program in Java. There is a server that

  • 0

I am currently writing a chatroom program in Java. There is a server that handles all the client connections and one main display where all the talking takes place. One feature I want to include is a constantly updating list of all the users in the chatroom in the sidebar. However, the way the program works is that the client opens a character stream with the server and data is sent back and forth that way.

Right now, any characters sent to the server from the client is relayed to all the clients and put on the main display. However, I want to send information to the client from the server about the list of users. How would I be able to differentiate between the userlist information and main display information?

  • 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-05T08:55:01+00:00Added an answer on June 5, 2026 at 8:55 am

    1- You can have two lines of communication. A line( a socket connection ) will accept the incoming events for users list. The other line will accept information used for the main display. It is better to not to open many connections to the server because you need to open more ports or handle multiple connections from a single client on one port.

    2- You can use control flags or message types so you can distinguish the type of message you are receiving from the server. When it is related to updating the users list you do so and when it is about displaying something on the main board, you display it.

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

Sidebar

Related Questions

I'm currently writing a jdbc client-server socket application in java. I've been having a
I'm currently writing a Java app that interfaces with a MySQL database. My problem
I'm currently writing an application that allows one to store images, and then tag
I'm currently writing a proxy application that reads from one socket and writes on
I am currently writing a C program that requires frequent comparisons of string lengths
I am currently writing the specification for an API that works as follows: Client
I'm am currently writing a program that calculates the digits of pi, and I
I am currently writing a program that formats certain words in a Rich Text
I am currently writing a calculation program for the Windows Phone. One of the
I'm currently writing myself a little C# back up program. I'm using a standard

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.