Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

client acting as server simulateously using multithreading for bittorrent  RSS feed

 
Anand D
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, My college project is a minature version of bittorrent where i need the client to act like a server ie.giving the file and taking the file at the same time from other clients..... Using Multithreading.....

Will it have some conflict........how can i implement it??
 
Mehul Sanghvi
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Synchornize all methods which access the file on the same object.

Well I guess the project given to you is more for learning, so rather than giving you the implementation I would suggest you learn more about thread synchronization and do the stuff yourself!
I hope this helps:
http://java.sun.com/docs/books/tutorial/essential/threads/

Regards,
Mehul K. Sanghvi.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!