creating an instant messenger program in java

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Closed Thread

Join Date: Jun 2005
Posts: 2
Reputation: mark_terri is an unknown quantity at this point 
Solved Threads: 0
mark_terri mark_terri is offline Offline
Newbie Poster

Re: creating an instant messenger program in java

 
0
  #21
Jun 22nd, 2005
hey,
I am trying to develop an instant messenger on lines of yahoo ....
jus started out buh have hit a few roadblocks ... and I am new to java too and this is and application I am developing to learn java.

Some problems I am facing are:

1. I have mulitple functions like userLogin and registerNewUser etc in my client ... and I use an objectwriter stream ... so how can i tell on the server as to wht operation is to be performed.

2. I have to maintain a list of contacts for a perticular user ... each user has a unique Id. so what can be the most efficient way to do this ... storing all info for each user will take lots of space ...

3. In C# there is a mechanism to create a UUID ... this is also availabe in java 5.0 buh i could not find any such mechnism in java 1.40...

thanks!!

Mark
Quick reply to this message  
Join Date: Jun 2005
Posts: 57
Reputation: Easter Bunny is an unknown quantity at this point 
Solved Threads: 1
Easter Bunny's Avatar
Easter Bunny Easter Bunny is offline Offline
Junior Poster in Training

Re: creating an instant messenger program in java

 
0
  #22
Jun 22nd, 2005
ok, what i've done on my little chat thingy is quite "basic". i have my server running and then a client would log in and the server would take the username and see if anyone is connected with that name yet(stores them in a vector - too busy at work to start making it more complex with a database and passwords and stuff, but that will come).

what you need to do, is if a user logs in, then send out a list of all the logged in users to the clients(i keep them in a vector in my server app and then run a method that sends out data to each of them). your clients should then take that list (something like "<users>bob-_-steve-_-billy-_-john-_-") and break it up with StringTokenizer(there they're separated with "-_-", but you can use anthing you like that you think would be unique) and just add that to the JList in your app or whatever you use to display the users(use a vector to store those usernames in and then just use userList.setListData( userVector ) to update the list).

if someone disconnects, then you send out a list again and your clients would then see if anything new is added or if anything isn't there and then update the list.

does that make it any clearer?

i've got my program, but haven't got a use for it yet. anyone want to buy it?
Quick reply to this message  
Join Date: Jun 2005
Posts: 3
Reputation: razibcse is an unknown quantity at this point 
Solved Threads: 0
razibcse razibcse is offline Offline
Newbie Poster

Re: creating an instant messenger program in java

 
0
  #23
Jun 30th, 2005
Hi everyone,

I am developing a peer-to-peer file transfer system. And I also had to maintain user names and their information in the server for later use. You can save the user info by creating a thread which sends user info to the server. And the server must have a thread running to receive the information...This is for sending info to server...

And you can use multicasting to send a message to all clients simultaneously...I implemented the mechanism, but the problem is multicasting allows only 224.0.0.1 to 239.255.255.255-- these IP addresses to use...I used 228.6.7.8. But lots of exceptions were generated and said that this IP address can't be used? Cannot I use localhost to implement multicasting? What do you guys think?

Best of luck

Razib
Quick reply to this message  
Join Date: Feb 2007
Posts: 4
Reputation: Tivoilos is an unknown quantity at this point 
Solved Threads: 0
Tivoilos Tivoilos is offline Offline
Newbie Poster

Re: creating an instant messenger program in java

 
0
  #24
Feb 1st, 2007
Hey This was very interesting to read, I had been wondering for a long time on how to make a IM of my own but this really does not help much could someone show me where to go to learn about this style of coding plz it would help me out alot thanx's
Quick reply to this message  
Join Date: Mar 2005
Posts: 192
Reputation: stupidenator is an unknown quantity at this point 
Solved Threads: 4
stupidenator's Avatar
stupidenator stupidenator is offline Offline
Junior Poster

Re: creating an instant messenger program in java

 
0
  #25
Feb 1st, 2007
Originally Posted by Tivoilos View Post
Hey This was very interesting to read, I had been wondering for a long time on how to make a IM of my own but this really does not help much could someone show me where to go to learn about this style of coding plz it would help me out alot thanx's
I got the initial part of my design out of a book called "Head First Java". They had a simple Instant messager client and server in there and I just added to it and modified it as I learned more.

Nick
Quick reply to this message  
Join Date: Jul 2007
Posts: 3
Reputation: piyali is an unknown quantity at this point 
Solved Threads: 0
piyali piyali is offline Offline
Newbie Poster

Re: creating an instant messenger program in java

 
0
  #26
Jul 2nd, 2007
am trying 2 create a messnger..
but dont kw hw 2 strt can n1 plzz help me
my mail id is
<snipped>
plzz help me
thnxx a lott
Last edited by happygeek; Jul 2nd, 2007 at 4:42 pm. Reason: email address snipped, please keep it on site
Quick reply to this message  
Join Date: Jun 2007
Posts: 1
Reputation: BeccaD123 is an unknown quantity at this point 
Solved Threads: 0
BeccaD123 BeccaD123 is offline Offline
Newbie Poster

Re: creating an instant messenger program in java

 
0
  #27
Jul 2nd, 2007
I am also trying to create an instant messaging program. If anyone has advice I would much appreciate it. My email address is <snipped>
Last edited by happygeek; Jul 2nd, 2007 at 4:40 pm. Reason: email address snipped, keep it on site please
Quick reply to this message  
Join Date: Jul 2007
Posts: 3
Reputation: piyali is an unknown quantity at this point 
Solved Threads: 0
piyali piyali is offline Offline
Newbie Poster

Re: creating an instant messenger program in java

 
0
  #28
Jul 2nd, 2007
hii where can we find that book?is the ebook available?
Quick reply to this message  
Join Date: Dec 2004
Posts: 4,272
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 494
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: creating an instant messenger program in java

 
0
  #29
Jul 2nd, 2007
You may find it in school library if you look for it, is one of common titles
and NO there is not electronic version, if there is then it is illegal
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Quick reply to this message  
Join Date: Mar 2004
Posts: 802
Reputation: Phaelax is on a distinguished road 
Solved Threads: 40
Phaelax Phaelax is offline Offline
Practically a Posting Shark

Re: creating an instant messenger program in java

 
2
  #30
Jul 3rd, 2007
Sorry piyali, I only understand English grammar. Since nobody is aware of Google, I decided to be a nice guy and find some resources for all of you.

http://java.sun.com/developer/online...a2/socket.html
http://java.sun.com/docs/books/tutor...ets/index.html
http://www.cise.ufl.edu/~amyles/tcpchat/
http://www.javaworld.com/javaworld/j...2-sockets.html


Once you know how to use the socket classes and understand the functionality of an instant messenger program, then you'll be able to write a simple chat client without too much difficulty. If you wish to create a client over an existing chat network, that's a whole other issue.
Quick reply to this message  
Closed Thread

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



Other Threads in the Java Forum


Views: 33640 | Replies: 33
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC