943,865 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 50509
  • Java RSS
You are currently viewing page 3 of this multi-page discussion thread; Jump to the first page
Jun 22nd, 2005
0

Re: creating an instant messenger program in java

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mark_terri is offline Offline
2 posts
since Jun 2005
Jun 22nd, 2005
0

Re: creating an instant messenger program in java

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?
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
Easter Bunny is offline Offline
57 posts
since Jun 2005
Jun 30th, 2005
0

Re: creating an instant messenger program in java

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
razibcse is offline Offline
3 posts
since Jun 2005
Feb 1st, 2007
0

Re: creating an instant messenger program in java

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Tivoilos is offline Offline
4 posts
since Feb 2007
Feb 1st, 2007
0

Re: creating an instant messenger program in java

Click to Expand / Collapse  Quote originally posted by Tivoilos ...
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
Reputation Points: 18
Solved Threads: 4
Junior Poster
stupidenator is offline Offline
192 posts
since Mar 2005
Jul 2nd, 2007
0

Re: creating an instant messenger program in java

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
piyali is offline Offline
3 posts
since Jul 2007
Jul 2nd, 2007
0

Re: creating an instant messenger program in java

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
BeccaD123 is offline Offline
1 posts
since Jun 2007
Jul 2nd, 2007
0

Re: creating an instant messenger program in java

hii where can we find that book?is the ebook available?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
piyali is offline Offline
3 posts
since Jul 2007
Jul 2nd, 2007
0

Re: creating an instant messenger program in java

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
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 873
Code tags enforcer
peter_budo is offline Offline
6,656 posts
since Dec 2004
Jul 3rd, 2007
2

Re: creating an instant messenger program in java

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.
Reputation Points: 92
Solved Threads: 51
Practically a Posting Shark
Phaelax is offline Offline
856 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in Java Forum Timeline: Needs Brainstorming!!!
Next Thread in Java Forum Timeline: school task help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC