954,184 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

help me to create a java chat server

hi
can any one give me a code for chatserver in java which have bi-directional comminication.lik server listen more no.of clients n give reply and client mak request to server. ther should be a frame where a textarea and a textfield.all messages are printed on textarea and after hit of return key from keybord the textfield area will blank.

itsukumar
Newbie Poster
2 posts since Apr 2006
Reputation Points: 10
Solved Threads: 0
 

Check this

aniseed
Posting Whiz
359 posts since Apr 2006
Reputation Points: 48
Solved Threads: 7
 

I've pretty much decided my next project after I submit my SCJD work will be to create a complete IRC server in Java.
I might even release the source after it's done, but it will likely take a few years until it's fully functional unless I bring others on board to assist in the project.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

There is a briliant tutorial in Deitel&Deitel book Programming in Java Sixth Edition somewhere around cahpter 23-24

peter_budo
Code tags enforcer
Moderator
15,433 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 901
 

The biggest problem is multithreading. If you want to use it with a GUI then you'll most certainly have to use multithreading. I made a really crappy one a while back just as a console application, because the multithreading got to be a pain.

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

the tutorial which i mentioned has multithreading. It is starting from simple window to window messaging and than they explain advance technics which include multithreading

peter_budo
Code tags enforcer
Moderator
15,433 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 901
 

for the server you ALWAYS have to use multithreading ;)
For the client as well really, else you either can never enter any text yourself or won't get anything back until you do.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You