Advertisement
3_2004-2005 Miscellaneous #145474

Chatting Application

A simple concurrent chat application: * The application is composed of a Java server application and a client applet. * The chat program will allow multiple students (clients) to talk with each other at the same time as well as to their instructor on the server side. * There can be more than one active chat room at a time A) Server side * Server is a Frame which has the following information. There are 3 classrooms which the server is supervising . The frame shows all the three classrooms as a TextArea which will display the messages from the students logging on to that chatroom. * The server can listen to all the information sent and exchanged among students of a classroom. The server can also talk to any one particular classroom.There is a TextField for the server to type in its messages and on pressing a "SEND" button that messages should be sent to all clients logged on the classroom the server wants to talk to. * Each client should login to the server before entering a classroom. * It shall authenticate students’ requests to join the chat by means of a username and password. After successful Login, the server will assign the client to the classroom it requested to be signed in for.In This Application The Username and the Password are the Same. * The server keeps track of the clients in each classroom and produce that data whenever the server needs to see it. * Whenever a client logs in or logs out, all the other clients present in that classroom are notified of the new client entry/exit and when the client logs off, its information isdeleted. * When a new user connects to the chat server, a new connection will be created to service the client applet's communication. Multiple clients can communicate with the server via a socket interface. B) Client Side * The client should log on to the server using a Username and Password. It should also provide the server the classroom it wants to log on to. * On sending the information to the client, the server authenticates the username and password and if they match open a new thread to service this client. If the user name and password does not match, then the server should prompt the client.The Username And Password should be same in this application. * The client Applet/Frame shall has GUI for students to log to the server and to be able to chat with other students (the interface displays a list of other students in the same chat room). * The interface has a TextArea to display the messages sent by other clients in that chatroom. The interface should also provide a TextField for the client to type its questions and send it to the server. * The client will be able to see the messages sent by the server to its classroom. * Clients cannot see the messages sent by other clients present in different classrooms. * Whenever a fresh client logs on to the classroom in which the old client is logged on, then the information about that client is visible immideatly i.e. the all clients updates its classroom list to display the new client automatically. * The client can send messages to other students in the same chat room or ask his instructor a question. * The client shall be able to logout or to exit at any time.

AI

Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Zdrojový kód
original-source
Upload
Původní komentáře (3)
Obnoveno z Wayback Machine