• 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

Java ServerSocket Problems

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am designing a java server using java's ServerSocket class. The issue is that i have to run a infinite loop to handle all the incoming requests. Now i also intent to a lot of other things in that application. Is there a way to run the server to hear the requests and then do other tasks also such as giving response to other things happening to application.

To explain a little more the application is a server as well as a data management program. User enters the data and it is needed to be saved. But if the application keep stuck in waiting for the serversockets it can not process the data.

Any help will be much appreciated.

Regards
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could run the server in its own thread within the application.
 
reply
    Bookmark Topic Watch Topic
  • New Topic