Your SlideShare is downloading. ×
Chat Passion Series
Chat Passion Series
Chat Passion Series
Chat Passion Series
Chat Passion Series
Chat Passion Series
Chat Passion Series
Chat Passion Series
Chat Passion Series
Chat Passion Series
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Chat Passion Series

415

Published on

A client-server based e-chat application in Java

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
415
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Submitted to Submitted • Er.:Mayank by : • Naveen Moorjani (Team Sharma • Chandni Verma Leader) • Tushar Seth (Coder) (Tester)
  • 2. Objective A JAVA Chat Application based on client-server architecture.
  • 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. Technologies used Networking Multi-threading Applets Abstract window toolkit (AWT)
  • 5. Simplest Concept
  • 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. 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. 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. Future prospects Multiple chat rooms. Multiple skins Multi lingual support Higher Security Protocols
  • 10. Thanks for watching, Goodbye !

×