Threads Created By Client and Server at Their Ends

First thread will read data from the socket and it will be stored in the queue say q1. Second thread will remove data from q1 and it will display on GUI. The GUI chat window is implemented using JAVA Swing. 

Third thread will take the input messages from the user and it will write in to the queue say q2. Fourth thread will remove data from q2 and it will be written in to socket. Q1 queue is accessed by first and second threads synchronously. Similarly Q2 queue is accessed by third and fourth thread synchronously.

This Project Paper is written & submitted by Deepak V.