+ All Categories
Home > Software > Multiuser chat application using java

Multiuser chat application using java

Date post: 15-Apr-2017
Category:
Upload: asifnoman240
View: 693 times
Download: 64 times
Share this document with a friend
21
Welcome to the Presentation Course : Computer Network American International University-Bangladesh
Transcript
Page 1: Multiuser chat application using java

Welcome to the PresentationCourse : Computer Network

American InternationalUniversity-Bangladesh

Page 2: Multiuser chat application using java

Presented by:1

GroupMembers

Name: Noman,Asif-AlID:14-27134-2

2Name: Md. Mahmudul HaqueID:14-27205-2

3Name: Beg , Md Safat AlamID:14-26469-2

Page 3: Multiuser chat application using java

Multi-user Chat-Application

Using Java Socket Programming

Page 4: Multiuser chat application using java

Contents Introduction. - About Chat Application. - About Tcp , Client , Server , Port &

Socket. Implementation - Basic Diagram Of Chat Application. - Process Of Multiuser Chat

Application. - Implementation using Java Socket

Programming. Conclusion. - Advantage & Disadvantage - Future plan.

Page 5: Multiuser chat application using java

INTRODUCTION OF MULTI-USER CHAT-APPLICATION

Page 6: Multiuser chat application using java

About Chat-Application

Chat-Application provide the process of talking to other people who are using the Internet at the same time you are.

Page 7: Multiuser chat application using java

About Tcp

Transmission Control Protocol is a standard that defines how to establish and maintain a network conversation via which application programs can exchange data. TCP works with the Internet Protocol (IP), which defines how computers send packets of data to each other.

Page 8: Multiuser chat application using java

About Client & Server A Client is a computer that request services from a server computer.

A Server is a computer that provides services to clients and controls access to hardware software and other resources.

Page 9: Multiuser chat application using java

About Socket

A socket is one endpoint of a two-way communication link between two programs running on the network. A socket is bound to a port number so that the TCP layer can identify the application that data is destined to be sent to.

Page 10: Multiuser chat application using java

About Port

In computer networking, a port represents a communication channel or endpoint. A port can be either physical or virtual. 

Page 11: Multiuser chat application using java

IMPLEMENTATION OF MULTI-USER CHAT-APPLICATION

Page 12: Multiuser chat application using java

Basic Diagram Of Chat Application

Page 13: Multiuser chat application using java

Process Of Multi-User Chat Application

Chat “Client1” Chat “Server” port (9001) Ip (10.0.0.1)

Ip , port (“10.0.0.1”,9000)Socket Creation Failed Ip , port (“10.0.0.1”,9001) Socket Created Successfully

Chat “Client2” Ip , port

(“10.0.0.1”,9001) Socket

Created Successfully

Wait For Another Client

Submit A name

Submit same name

as client1 Rejected

Submit unique name

Page 14: Multiuser chat application using java

Implementation In Java Package: import java.net.*; import java.io.*;

Opening a socket requires a hostname(or IP Address) and port number Socket client = new Socket(“ hostname ”,port number);

Create an input Stream & client name input

BufferedReader in = new BufferedReader ( new InputStreamReader(client.getInputStream( ) );Private String name = in.readline();

Page 15: Multiuser chat application using java

Continued….

Create an Output Stream PrintWriter out = new PrintWriter(client.getOutputStream( ));

Close the socket when done client.close();

Page 16: Multiuser chat application using java

Continued….

Server To Client Communication Channel

Client To Server Communication Channel

Page 17: Multiuser chat application using java

CONCLUSION OF MULTI-USER CHAT-APPLICATION

Page 18: Multiuser chat application using java

Advantage & Disadvantage

Advantage - User have to put unique name for chat. - Single user can’t start chatting.

Disadvantage - Can’t handle program crush. - If Server fails, whole system will fail.

Page 19: Multiuser chat application using java

Future Plan

Integration of video chat using web cam.

Making it more secure.

Recovery management system.

Page 20: Multiuser chat application using java

Any Question Please??

Page 21: Multiuser chat application using java

Recommended