systems lab - chat app

10
MULTI USER CHAT APPLICATION ABHISHEK AGARWAL BISHWAS C GUPTA SHUBHAM AGARWAL

Upload: abhishek-agarwal

Post on 29-Jan-2016

219 views

Category:

Documents


0 download

DESCRIPTION

PPt for Chat app client present as our mini project

TRANSCRIPT

Page 1: Systems Lab - Chat App

MULTI USER CHAT APPLICATIONABHISHEK AGARWAL

BISHWAS C GUPTA

SHUBHAM AGARWAL

Page 2: Systems Lab - Chat App

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.

Page 3: Systems Lab - Chat App
Page 4: Systems Lab - Chat App

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

Page 5: Systems Lab - Chat App

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 ".

Page 6: Systems Lab - Chat App

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.

Page 7: Systems Lab - Chat App

THE APPLICATION AT WORK

Page 8: Systems Lab - Chat App

CODE & DEMONSTRATION

Page 9: Systems Lab - Chat App

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

Page 10: Systems Lab - Chat App

THANK YOU!