Chat application using
socket programming
NAME : HASNAIN AKBAR
ROLL NO : B20CS007
BRANCH : CSE
SECTION : 1
YEAR : 2023
COUNSELLOR NAME : DR S VENKATRAMULU
Introduction
Java Socket programming is used for communication between the
applications running on different JRE.
Java Socket programming can be connection-oriented or connection-
less.
Socket and ServerSocket classes are used for connection-oriented socket
programming and DatagramSocket and DatagramPacket classes are
used for connection-less socket programming.
The client in socket programming must know two information:
IP Address of Server, and
Port number.
Literature survey
In this application, client sends a message to the server,
server reads the message and prints it. Here, two classes
are being used: Socket and ServerSocket. The Socket class
is used to communicate client and server. Through this
class, we can read and write message. The ServerSocket
class is used at server-side. The accept() method of
ServerSocket class blocks the console until the client is
connected. After the successful connection of client, it
returns the instance of Socket at server-side.
Objectives
In this application we are going to implement a real time chat
application using java socket programming which is present in java.net
package
Users can communicate by messaging in a flexible interface.
This application provides high security and faster communication.
Methodology
Merits :
Faster messaging
Peer to peer communication
Low network traffic
High Security
Demerits :
Increased complexity cost
If any program stops then connection is ended
Communication can be established only with the machine requested, not with any
another machine.
Conclusion
Socket programming provides secure data transfer between any two
machines .It provides high security and reduces network traffic .Users can
communicate easily without any risk of data being hacked . This real-time
chat application helps in faster communication between users over a
network .
References
Socket Programming / (IJCSIT) International Journal of Computer
Science and Information Technologies, Vol. 5 (3) , 2014, 4802-4807
Design and Implementation of Client-Server Based Application Using
Socket Programming in a Distributed Computing Environment
Java network programing using socket 4 IJIRT | Volume 1 Issue 5 |
ISSN : 2349-6002
Thank you