|
-
Aug 10th, 2001, 12:31 AM
#3
Member
Yes, it is very possible. I have just started making chat apps, and I know a litle bit about applets.
Applets can only access the computer that they ran from, they can not connect to a computer directly. It is one of the things that Sun did to make applets safe.
This is not a problem though. You could make the inteface etc. in an applet, then run a server on the same machine, as the applet will be running from.
When someone trys to run the applet, you could ask for login ID & password etc. The ID & password would be sent to the server, checked out and make sure it is OK.
Then the server could store a list of all logged in users, and send the list back to the applet, and ALL other applets running, so you would have to keep their connection to the applet alive, and do not close it. You would need a multithreaded server, not hard. It is easier than you think.
The applet then shows list of user. when a user clicks on anouther user in the list, you could then send that name tothe server, the server would ask the other user if he/she accepts the chat, then the server sends a reply, OK or NO, if they accept to chat.
So..
1. You log in and send to server
2. Server updates user list
3. you click on user and send username to server
4. server asks the clicked user if he/she wants to chat with u.
5. server send reply
6. you send text to server.
7.server sends that text to other user.
8.you log off
9. server updates list.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|