• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

chat application

 
Balu Ramachandran
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends,
can any body please explain how to develop a chat application.
thanks,
Balu Ramachandran
 
Sandeep Jain
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
It is pretty simple .
------------
for Server
------------
1)Create a server socket for the server . This socket should continuously listen to the port (which explictly assinged eg 9000 or anything).
2)To identify who has send the data to the server ,store the username and its outputStream in the hashtable.
3)take the list of all the user from the hastable with there output stream
4)send the recieved data to all the client .

-------------
for client
--------------
1)create a client by using socket(hostname,serverport)
2)recieve the data using the dataInputStream
3)Appent the data to the text area.
------------------
Sandeep Jain
 
Balu Ramachandran
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks jain.
if u have any mock codes please send it to my mail id
rbalu@arabia.com
with regards,
Balu Ramachandran
Bangalore.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic