Java Mini Project Lan Chat
Java Mini Project Lan Chat
Abstract
Our Java project is based on the LAN chat server. During this project we covered the
basics of using classes or features on:
Swing : Swing is built on top of AWT and is entirely written in Java, using AWTs
lightweight component support. In particular, unlike AWT, the architecture of Swing
components makes it easy to customize both their appearance and behavior.
Components from AWT and Swing can be mixed, allowing us to add Swing support
to existing AWT-based programs. For example, swing components such as JSlider,
JButton and JCheckbox could be used in the same program with standard AWT
labels, textfields and scrollbars.
INTRODUCTION
SOLUTION ????
FEATURES
Chatting
Voice Chat(can be implemented)
File Transfer(can be implemented)
Bulletin Board
Display of friend list
CONTEXT DIAGRAM
Networking (java.net)
The java.net package provides two classes--Socket
and ServerSocket--that implement the client side of
the connection and the server side of the
connection, respectively.
Network Socket
Allows a single computer to serve many client at once
As well as serving different information also
This is managed by port
Port
Socket Basics
A socket is one end-point of a two-way communication link
between two programs running on the network. Socket classes
are used to represent the connection between a client program
and a server program
A socket is a connection between two hosts.
It can perform seven basic operations:
Connect to a remote machine
Send data
Receive data
Close a connection
Bind to a port
Listen for incoming data
Accept connections from remote machines on the bound port
WORKING
Programming Basics
Programming Basics(contd..)
Create an input Stream to read the response from server
BufferedReader in = new BufferedReader(new
InputStreamReader(client.getInputStream( ));
Create an Output Stream that can be used to send info to the
socket
PrintWriter out = new PrintWriter(client.getOutputStream( ));
out.println( Hi Dude!!);
out.print(Howz life!!);
Close the socket when done
client.close();
USES :
To efficiently communicate in a
1. Company
2. Institution
3. Hostel
LIMITATIONS
Delay of 2-3 seconds in voice transfer
Server fails whole system fails
Server
Client 1
Client 2
FUTURE EXPECTS
1. Integration of video chat using web cam.
2. Making it more secure.
3. Recovery management system.
THANK YOU!