File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Chat Application

 
chander shivdasani
Ranch Hand
Posts: 206
Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a chat application involving one server and multiple clients. However, when clients chat, the messages should not pass through server.
This is what i intend to do:

> Send chat request to server
> Server replies with credientials(IP,Port) of the other client
> Establish a connection with other client and proceed with the chat.

I am facing a problem in the 3rd step. I dont know how to establish a connection between client and another client?.
For establishing a connection between client and server i have used socket and server sockets. What is the way of establishing connection between client and another client?

 
Lorand Komaromi
Ranch Hand
Posts: 276
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The clients will have to listen for incoming connections, just like your server...
 
chander shivdasani
Ranch Hand
Posts: 206
Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does that mean each client will also have a server socket associated with it?
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chander shivdasani wrote:Does that mean each client will also have a server socket associated with it?


Yes.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic