• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem trying to implement server with multiple clients  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to implement a server -client model where a master file need to be split into chunks and divided against peer nodes. The peer nodes share among themselves to get the whole file instead of getting it directly from the server. I'm running into issues when I run multiple peers instead of one. I get the following exception on each of the client thread trying to download files from server:




code for server to listen on a port and accepting connection from client:


As above each Client gets a ServerThread instance to send files to that client from server:



client can be initiated with this:


so each client starts a clientThread which initiates TCP connection with server and downloads its share of the chunk files:



I get the error at the line marked red. Can somebody help me out.

Thanks!!!
 
curious gally
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it works absolutely fine if I just create one client thread. It fails when I try with more than one client.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!