title: Chat server and client Implementation
body: <p>I want to Implement a Chat Server and Client using java like gTalk, what Type of connection should i work on(<code>XAMPP</code> or <code>Socket Connection</code>), please guide me, i want to implement this for my final sem project.It will be a kind of <code>Instant Messaging</code> like gTalk and skype.  </p>
  
  <p>Please give me some idea/outlines or links where i can read some stuff, so that i can study some and start implementing those.</p>
  
  <pre><code>try {
       Socket skt = new Socket("localhost", 1234);
       BufferedReader in = new BufferedReader(new
          InputStreamReader(skt.getInputStream()));
       System.out.print("Received string: '");
  
       while (!in.ready()) {}
       System.out.println(in.readLine()); // Read one line and output it
  
       System.out.print("'\n");
       in.close();
    }
    catch(Exception e) {
       System.out.print("Whoops! It didn't work!\n");
    }
  </code></pre>
  
  <p>Thanks</p>