Sei sulla pagina 1di 16

m 

 



m 

„ 


 

AIM OF THE PROJECT

j To attain a chat model which can perform many processes or tasks


at same time with very low halting problem i.e. a Multi-Threaded
Server Client Chat Model.
INTRODUCTION

j A networking is a set of devices (often referred to as nodes) connected by


communication links. A node can be a computer, printer, or any other device capable
of sending and/or receiving data generated by other nodes.

j Socket programming is the basis for developing networking applications it can be


done in c, c++, Java etc.

j A simple Server Client Chat application is the basics of networking application.

j Here is the Multi-threaded Sever Client Chat Model (An enhanced version of
Simple Server Client Chat Model).
INTRODUCTION CONT«

j The Language used for developing the Application is Java.

j The Application performs task of sending a message from one client to


another and at the same time receiving the message from another client with
almost no delay of time.

j Feature achieved through a very powerful feature of Java called Multi-


Threading.
REQUIREMENTS
j 

- Processor: Intel Pentium 2 or higher
- Speed: 1GHz +
- RAM: 256 MB or Higher
- Free Disk Space: Minimum 100 MB of free Disk Space
j 

- The System should Have a Ethernet card or LAN card.
- The System Should LAN network (Local Area Network).
j 

- JDK1.2 (Java Development Kit version 1.2) or higher (depending upon the operating
System used)
j JRE (Java Runtime Environment)
j Operating System: Windows 98 or higher, Linux, Open Solaris, Apple MAC OS
LANGUAGE ENVIRONMENT

j Developed in Java since Java provides already pre-existing API·s or


Application Programming Interface for networking(Socket
Programming), GUI development, Even Handling, Threading etc.

j Thus Java making application development a easy piece of cake to


work upon and develop.
WORKING OF THE APPLICATION

j There is a simple Server which accepts request from clients and provides them
connection and handles there chat session.

j The Stream Communication Protocol is TCP/IP protocol( a connection


oriented protocol).
CONTINUE«..1

j Class Socket implements the client side and the class ServerSocket class
implements the server side of the two-way link. .

j The client request the server at some IP address and TCP port number.

j To communicate over a socket connection, I/O streams in Java are


used(performs read/write operations).
CONTINUE«..2

j InputStreamReader chained to the socket·s low-level(Connection) Input Stream


with
ë ë !"ë##$

j InputStreamReader is the ¶bridge· between a low level byte stream (like the one
coming from the socket) and a high level character stream BufferedReader

j Now Finally chain the BufferedReader to the already chained InputStreamReader


„%%% „%%#$
&""!'&#$
CONTINUE«..3

j Now to write data to a socket PrintWriter class is used which has print() and
println() method.

j With the similar procedure as in reading data PrintWriter is also chained to the
Socket·s low-level (Connection) output-stream.

&(& &
&(& !")##$

j Now to write a message we use


&!&*+",-#$
CONTINUE«..4

j Threads in Java are used to make application perform multiple processes at


same time, it doesn·t actually happens like but appears.

j To create a thread we write the statement as


M#$
!#$

j Multi-threading in java means looking at both the thread and the job that·s run
by the thread.
CONTINUE«..5
DEVELOPED APPLICATION

Client A Server




p  

p
 
 

DATAFLOW DIAGRAM
p    p  
    
  

p 
 
 p 
 
        
  
  


 
 
p 


   
 
    

p  
    
 




  
     

  



 
CONCLUSION

j Finally a Chat system is obtained which can handle simultaneous


tasks like receiving and sending message at same time with high
efficiency and very low halting problem if many clients are connected
together.
THANKYOU

Potrebbero piacerti anche