• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Chat Programming.

 
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I want to write a chat program where there are basically a server and many clients., I would be much appriciated if you guys give me some ideas,
Thank you very much.......
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In high level terms consider this option. The Client and Server programs both open ServerSockets and act as clients to each other. If this is a bit confusing at first, do some simple tutorials on socket clients & servers, or find a friend and role-play the two machines.

Lots of moving parts, no? And I left out any way to log out. The client might tell the server it is logging out so the server can remove the client from the list of logged in clients. Or the server might try to connect to a client and fail, meaning the client is no longer running. That would be a sign to remove the client from the list of logged in clients, too.
Hope that helps!
 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
Thank you very much for the reply. I did figure out how to do the task, It is interesting. I am enjoying the programming.
Thank you very much for helping.
 
Get out of my mind! Look! A tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic