• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem trying to implement server with multiple clients

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic