Developed By Aazam Jutt
- It uses a simple server that creates a Thread as a ChatHead between clients.
- It uses some commands for inter-server-client communication to perform some actions.
- When client connects to server and ask for connection, Server asks for name of the client and registers it in local data structure (Dictionary) along with a socket, on which serverr is connected to the client.
- In this Dictionary Client's name act as a Key and its Socket is the value.
- When 1st client arrives and No one is online, Server sends a message to client that "No one is online wait...".
- When 2nd client arrives, Server registers it and displays "Online Clients" page to him/her. When client select one of the online clients. Server starts a ChatHead as a thread. Server recieves Messages from a client and sends it to another client.
- Run the Server file. Server starts listening
- Run the Client File. Registeration form appears.Register with name and press submit.
- Server sends a message to Client, that no one is Online.
- If you are running it on the same machine. Run Client file a 2nd time and register again.
- If any Client is Online. Server shows it in the Online Client window
- When you Click any of the client. Server sends a request to that client with a proper message.
- When other client accepts the Request chat starts between the Clients and both clients' status is set to Busy, no other client will see these client in their online client window.
- A visualization of inter-cient chatting.
- If one of the client presses (X) or end_Chat button. other client recieves a message.
- Server side behaviour during all this processing.
- Handle, Thread-safe variable. i.e. Critical Section Management between Threads.