SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Submitted to     Submitted
  • Er.:Mayank       by :
                  • Naveen Moorjani (Team
     Sharma       • Chandni Verma
                         Leader)
                  • Tushar Seth
                      (Coder)
                     (Tester)
Objective

 A JAVA Chat Application based
 on client-server architecture.
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.
Technologies used

 Networking
 Multi-threading
 Applets
 Abstract window toolkit
 (AWT)
Simplest Concept
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 ); }
}
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 ); }
               }
      }
}
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 ); }
}
Future prospects
 Multiple chat rooms.
 Multiple skins
 Multi lingual support
 Higher Security Protocols
Thanks for watching, Goodbye !

Weitere ähnliche Inhalte

Was ist angesagt? (20)

IPC
IPCIPC
IPC
 
Multi-Threading
Multi-ThreadingMulti-Threading
Multi-Threading
 
Java threads
Java threadsJava threads
Java threads
 
IPC
IPCIPC
IPC
 
MULTITHREADING CONCEPT
MULTITHREADING CONCEPTMULTITHREADING CONCEPT
MULTITHREADING CONCEPT
 
Interprocess communication (IPC) IN O.S
Interprocess communication (IPC) IN O.SInterprocess communication (IPC) IN O.S
Interprocess communication (IPC) IN O.S
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 
Ipc ppt
Ipc pptIpc ppt
Ipc ppt
 
Thread
ThreadThread
Thread
 
unix interprocess communication
unix interprocess communicationunix interprocess communication
unix interprocess communication
 
Operating System 4
Operating System 4Operating System 4
Operating System 4
 
JNA
JNAJNA
JNA
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 
Operating System-Threads-Galvin
Operating System-Threads-GalvinOperating System-Threads-Galvin
Operating System-Threads-Galvin
 
Slot02 concurrency1
Slot02 concurrency1Slot02 concurrency1
Slot02 concurrency1
 
Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2
 
Thread&multithread
Thread&multithreadThread&multithread
Thread&multithread
 
CIS246
CIS246CIS246
CIS246
 
System Programming - Interprocess communication
System Programming - Interprocess communicationSystem Programming - Interprocess communication
System Programming - Interprocess communication
 
Message passing ( in computer science)
Message   passing  ( in   computer  science)Message   passing  ( in   computer  science)
Message passing ( in computer science)
 

Andere mochten auch

Chandni verma contributions-made-by-a-newbie-to-the-free-desktop's-empathy
Chandni verma contributions-made-by-a-newbie-to-the-free-desktop's-empathyChandni verma contributions-made-by-a-newbie-to-the-free-desktop's-empathy
Chandni verma contributions-made-by-a-newbie-to-the-free-desktop's-empathyChandni Verma
 
STEGANOGRAPHY PRESENTATION SLIDES
STEGANOGRAPHY PRESENTATION SLIDESSTEGANOGRAPHY PRESENTATION SLIDES
STEGANOGRAPHY PRESENTATION SLIDESLovely Mnadal
 
Steganography chandni verma(cse 4th year)
Steganography chandni verma(cse 4th year)Steganography chandni verma(cse 4th year)
Steganography chandni verma(cse 4th year)Chandni Verma
 
Ray Wang - Gnome Accessibility And Automation Testing
Ray Wang - Gnome Accessibility And  Automation TestingRay Wang - Gnome Accessibility And  Automation Testing
Ray Wang - Gnome Accessibility And Automation TestingMario B.
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting PersonalKirsty Hulse
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldabaux singapore
 

Andere mochten auch (9)

Chandni verma contributions-made-by-a-newbie-to-the-free-desktop's-empathy
Chandni verma contributions-made-by-a-newbie-to-the-free-desktop's-empathyChandni verma contributions-made-by-a-newbie-to-the-free-desktop's-empathy
Chandni verma contributions-made-by-a-newbie-to-the-free-desktop's-empathy
 
STEGANOGRAPHY PRESENTATION SLIDES
STEGANOGRAPHY PRESENTATION SLIDESSTEGANOGRAPHY PRESENTATION SLIDES
STEGANOGRAPHY PRESENTATION SLIDES
 
Steganography chandni verma(cse 4th year)
Steganography chandni verma(cse 4th year)Steganography chandni verma(cse 4th year)
Steganography chandni verma(cse 4th year)
 
Ray Wang - Gnome Accessibility And Automation Testing
Ray Wang - Gnome Accessibility And  Automation TestingRay Wang - Gnome Accessibility And  Automation Testing
Ray Wang - Gnome Accessibility And Automation Testing
 
Steganography
SteganographySteganography
Steganography
 
Image Steganography
Image SteganographyImage Steganography
Image Steganography
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 

Ähnlich wie Chat Passion Series

Ähnlich wie Chat Passion Series (20)

Ipc
IpcIpc
Ipc
 
Networking in Java
Networking in JavaNetworking in Java
Networking in Java
 
Multithreading
MultithreadingMultithreading
Multithreading
 
Multi user chat system using java
Multi user chat system using javaMulti user chat system using java
Multi user chat system using java
 
28 networking
28  networking28  networking
28 networking
 
Network Programming in Java
Network Programming in JavaNetwork Programming in Java
Network Programming in Java
 
Usp message queues
Usp message queuesUsp message queues
Usp message queues
 
Java seminar.pptx
Java seminar.pptxJava seminar.pptx
Java seminar.pptx
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in Java
 
advanced java ppt
advanced java pptadvanced java ppt
advanced java ppt
 
MSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingMSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message Queueing
 
Unit 8 Java
Unit 8 JavaUnit 8 Java
Unit 8 Java
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in Java
 
Introduction to ns3
Introduction to ns3Introduction to ns3
Introduction to ns3
 
Chapter 3 - Processes
Chapter 3 - ProcessesChapter 3 - Processes
Chapter 3 - Processes
 
Ch03
Ch03Ch03
Ch03
 
Java sockets
Java socketsJava sockets
Java sockets
 
Thread 1
Thread 1Thread 1
Thread 1
 
IPC mechanisms in windows
IPC mechanisms in windowsIPC mechanisms in windows
IPC mechanisms in windows
 
Computer network basics
Computer network basicsComputer network basics
Computer network basics
 

Chat Passion Series

  • 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)
  • 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 !