I want to Implement a Chat Server and Client using java like gTalk, what Type of connection should i work on(XAMPP
or Socket Connection
), please guide me, i want to implement this for my final sem project.It will be a kind of Instant Messaging
like gTalk and skype.
Please give me some idea/outlines or links where i can read some stuff, so that i can study some and start implementing those.
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");
}
Thanks