• 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
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

How to create a chat server for my hostel

 
Ranch Hand
Posts: 42
Firefox Browser Tomcat Server Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys i wanna create a chat server-client for my hostel...
i wanna need some guidelines...
how i should begin......

how should i program the server and so many clients chatting at the same time...help me please..
 
Anupam Dee
Ranch Hand
Posts: 42
Firefox Browser Tomcat Server Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It can be assumed like the scenario of facebook or google chat...
can i use apache tomacat server for this purpose....or will have to code the server that will run on another server...
just help me please
 
Marshal
Posts: 28295
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would have thought that after all these years, and everybody and his uncle trying to write a chat server, that by now it would be possible to get a pre-written chat server and install it somewhere. Are you sure you want to write yet another chat server from scratch instead of just getting one which has already been written?
 
Anupam Dee
Ranch Hand
Posts: 42
Firefox Browser Tomcat Server Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes i want to write it again from scratch...
please help me how to begin...
see i know servlet programming and net programming...but how the application would be constructed...that's what i want to know
 
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


There is to get you started. It's not code, but it'll get you started. If you need a basic example of a client or server, I will give you it. I started making my first one when I found a SUPER simple server/client program (source code) and built off of that.

Good luck,
John Price

EDIT : This is on the server. On the client, you need to do something like this :


EDIT (2) : Make the server an Application. Make the client an Application or Applet. Applet will be harder (permissions, signing the JAR files, put it on a website with bandwidth, etc), but more convenient for the user. Application is easier, but less convenient for the user.
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Get hold of the Head first Java book. Read the networking and threads chapter (read it all actually). This same chapter has a sample chat client and server. this would make a good start.

You are going to need to know about Java io, sockets and multi-threading. Plus some gui stuff for the client.
 
this is supposed to be a surprise, but it smells like a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic