need help for java chat application

Reply

Join Date: Oct 2007
Posts: 10
Reputation: pawan_1983 is an unknown quantity at this point 
Solved Threads: 0
pawan_1983 pawan_1983 is offline Offline
Newbie Poster

need help for java chat application

 
0
  #1
Oct 1st, 2007
i am creating chat application .can anybody tell me how can i know who is on line on the server and how can i communicate with on line members.

thanks for help
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 41
Reputation: hussulinux is an unknown quantity at this point 
Solved Threads: 2
hussulinux hussulinux is offline Offline
Light Poster

Re: need help for java chat application

 
0
  #2
Oct 1st, 2007
first register all ur client with the server.
for a very basic application maintain a list in arraylist.
then when a new user logs in, send this arraylist to him and he'll get the list of users online

for an old user, send this list to the connected user at intervals of say 1 sec.

when a user is logged out, remove that user from the list...
Hussain Fakhruddin
Teks: http://www.teks.co.in
hussulinux at gmail dot com
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,331
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 248
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: need help for java chat application

 
0
  #3
Oct 1st, 2007
Originally Posted by pawan_1983 View Post
i am creating chat application .can anybody tell me how can i know who is on line on the server and how can i communicate with on line members.

thanks for help

In Other Words: "How do I write a Chat Application?" since the two posted "questions" is pretty much exactly what a chat application is, and possibly implying "Write a Chat Application for me."
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 763
Reputation: Phaelax is on a distinguished road 
Solved Threads: 38
Phaelax Phaelax is offline Offline
Master Poster

Re: need help for java chat application

 
0
  #4
Oct 1st, 2007
A google search for java chat application will return tons of useful results. Then if you get stuck on something more specific, let us know.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 10
Reputation: pawan_1983 is an unknown quantity at this point 
Solved Threads: 0
pawan_1983 pawan_1983 is offline Offline
Newbie Poster

Re: need help for java chat application

 
0
  #5
Oct 3rd, 2007
sir
tell me in detail.i am not rich in java
if possible send me some code for that
thanx
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,331
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 248
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: need help for java chat application

 
0
  #6
Oct 3rd, 2007
It makes no difference whatsoever if you are "rich in java" or not (at least for the first two steps). Sit down and think about what a chat application needs to do, in detail, without any consideration, whatsoever about which programming language might be used.

Once you have figured out what it needs to do, sit down and break these requirements up into "working groups" (i.e. modules) of related functions.

Then you can sit down and start searching through API docs/tutorials/Google for the Java methods you need to implement these functions (hopefully you know at least basic Java, i.e. how to define a class and the varying protection/access modifiers, etc, etc).

Then you can actually start coding. When, at this point, you have a specific question, come back and ask. But we are not going to do any of this work for you. We may nudge you in the right direction from time to time, when you ask (as this response is doing), but we are definately not going to "give you teh codez".

And stop spamming with personal messages. Keep the discussion here so everyone can benefit from it.
Last edited by masijade; Oct 3rd, 2007 at 7:54 am. Reason: typo
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 10
Reputation: pawan_1983 is an unknown quantity at this point 
Solved Threads: 0
pawan_1983 pawan_1983 is offline Offline
Newbie Poster

Re: need help for java chat application

 
0
  #7
Oct 4th, 2007
sir
i already created a simple chat server .clients can chat with this as a room .how can i communicate between two client from connection pool.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,331
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 248
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: need help for java chat application

 
0
  #8
Oct 4th, 2007
If you are using a server based chat (rather than an everybody to everybody, i.e. with multicast or whatever), then, obviously, you need to have the server accept the message, than send it out to all connected clients. What do you not understand there?

Edit: And, BTW, this
i already created a simple chat server
is not what you said. It would have been extremely advisable to include this sort of information in your first post. That would have definately prevented my last post (which seemd to irk you a bit, admit it). But, like they say, ask a stupid question .....
Last edited by masijade; Oct 4th, 2007 at 5:17 am.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 164
Reputation: orko is an unknown quantity at this point 
Solved Threads: 10
orko orko is offline Offline
Junior Poster

Re: need help for java chat application

 
0
  #9
Oct 4th, 2007
ha ha... interesting thing... i also agree, u shud have said abt exactly wat u need to know... besides i have some more question... what kind of server u r using? is it irc? or some thing else?... u said ppl can chat in a room... so does it mean they really don't know who else are in the room?... plz explain briefly wat ur chat server is doing... otherwise, itz difficult to guess.
A Perfect World
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 10
Reputation: pawan_1983 is an unknown quantity at this point 
Solved Threads: 0
pawan_1983 pawan_1983 is offline Offline
Newbie Poster

Re: need help for java chat application

 
0
  #10
Oct 5th, 2007
sir
i am using tomcat .first i create a server socket and this ss takes message from clients and send back to all clients(that is just like a chat room).
now i want to make client to client communication for private message and yes they dont know who else in the room.

Originally Posted by orko View Post
ha ha... interesting thing... i also agree, u shud have said abt exactly wat u need to know... besides i have some more question... what kind of server u r using? is it irc? or some thing else?... u said ppl can chat in a room... so does it mean they really don't know who else are in the room?... plz explain briefly wat ur chat server is doing... otherwise, itz difficult to guess.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC