• 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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:

 
The only cure for that is hours of television radiation. And this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic