This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Client server program

 
Madhumitha Baskaran
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to create a peer which is client as well as server. I am able to use threads to create server to handle many requests. But I should be able to create one more thread which will work as client in the same peer. How to create such different types of threads. I am not able to find out. Please help me.

Thanks,
Madhu
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as a Thread is concerned, it doesn't care whether the code it executes is acting as a client or a server.

You will probably find it easier to develop the classes for server and client separately - once you have verified they are working correctly, then work on the application combining both functions.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic