systems lab - chat app

Post on 29-Jan-2016

219 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

PPt for Chat app client present as our mini project

TRANSCRIPT

MULTI USER CHAT APPLICATIONABHISHEK AGARWAL

BISHWAS C GUPTA

SHUBHAM AGARWAL

WHAT IS CHATTING? Online chat may refer to any kind of communication over the Internet that offers a real-time transmission of text messages from sender to receiver.

Chat messages are generally short in order to enable other participants to respond quickly. Thereby, a feeling similar to a spoken conversation is created, which distinguishes chatting from other text-based online communication forms such as Internet forums and email.

Online chat may address point-to-point communications as well as multicast communications from one sender to many receivers and voice and video chat, or may be a feature of a web conferencing service.

THE PROJECT In the project we have built a chat application using JAVA using the java.net package for

networking. It is like a chat room application (or like a whatsapp group) where the messages of

one user are broadcasted to other connected users

It has two parts:

• Chat Client

• Chat Server

CHAT SERVER Is a multi-threaded chat room server.

When a client connects the server requests a screen name by sending the client the text "SUBMIT NAME", and keeps requesting a name until a unique one is received.

After a client submits a unique name, the server acknowledges with "NAME ACCEPTED".

Then all messages from that client will be broadcast to all other clients that have submitted a unique screen name.

The broadcast messages are prefixed with "MESSAGE ".

CHAT CLIENT Is a simple Swing-based client for the chat server.

Graphically it is a frame with a text field for entering messages and a text area to see the whole dialog.

The client follows the Chat Protocol which is as follows: ◦ When the server sends "SUBMITNAME" the client replies with the desired screen name. ◦ The server will keep sending "SUBMITNAME" requests as long as the client submits screen names that

are already in use. ◦ When the server sends a line beginning with "NAMEACCEPTED" the client is now allowed to start

sending the server arbitrary strings to be broadcast to all chatters connected to the server. ◦ When the server sends a line beginning with "MESSAGE " then all characters following this string should

be displayed in its message area.

THE APPLICATION AT WORK

CODE & DEMONSTRATION

References https://en.wikipedia.org/wiki/Online_chat

http://www.tutorialspoint.com/javaexamples/java_simple_gui.htm

http://www.tutorialspoint.com/java/java_networking.htm

Computer Networking: A Top-Down Approach by James F. Kurose and Keith W. Ross

THANK YOU!

top related