• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Needing help with handling multiple socket connections

 
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the application that I inherited I was told that I had to convert the application from a one port one connection application to a multiple connection application. I'm very new to socket programming and could really use some help in tackling this issue. Unfortunately, there are no other people on my team and I'm still trying to rifle through this code and learn the application.

Here is my code issue. I have a run() that calls a connect() in the same class but I have to be able to execute the rest of the run() code after EACH connection is made and verify that the activeSocket is still in the activeSockets list before making that connection in the connect(). Currently, the code is setup to get ALL the connections in the maxActiveSockets list BEFORE moving on in the run() but again, I need to be able to make multiple connections to the app up to the number of maxActiveSockets and process each connection separately. I hope this makes sense.

Any help/direction would be appreciated. Thank you.

Here is run() code:



Here is the connect() code:

 
today's feeble attempt to support the empire
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic