Chat Passion Series

472
-1

Published on

A client-server based e-chat application in Java

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
472
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Chat Passion Series

  1. 1. Submitted to Submitted • Er.:Mayank by : • Naveen Moorjani (Team Sharma • Chandni Verma Leader) • Tushar Seth (Coder) (Tester)
  2. 2. Objective A JAVA Chat Application based on client-server architecture.
  3. 3. Features Allows a client to communicate with all the other clients connected to the server. Light-weight. Easy to operate ! Can add a chat room to your website in minutes.
  4. 4. Technologies used Networking Multi-threading Applets Abstract window toolkit (AWT)
  5. 5. Simplest Concept
  6. 6. Protocol – Step 1 When a user types something into their chat window, their message will be sent as a string through a DataOutputStream.private void processMessage( String message ){ try { // Send it to the server dout.writeUTF( message ); // Clear out text input field tf.setText( "" ); } catch( IOException ie ) { System.out.println( ie ); }}
  7. 7. Protocol – Step 2  When the server receives a message, through a DataInputStream, it will send this same message to all users, again as a string through a DataOutputStream.void sendToAll( String message ) { synchronized( outputStreams ) { for (Enumeration e = getOutputStreams(); e.hasMoreElements(); ) { DataOutputStream dout = (DataOutputStream)e.nextElement(); try { dout.writeUTF( message ); } catch( IOException ie ) { System.out.println( ie ); } } }}
  8. 8. Protocol – Step 3 The users will use a DataInputStream to receive the message.public void run() { try { while (true) { String message = din.readUTF(); ta.append( message+"n" ); } } catch( IOException ie ) { System.out.println( ie ); }}
  9. 9. Future prospects Multiple chat rooms. Multiple skins Multi lingual support Higher Security Protocols
  10. 10. Thanks for watching, Goodbye !
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×