• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Repetitive acces to server using the same URLConnection

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an applet from witch I'm connecting to a web server every 2 seconds using an URLConnection for retreiving some informations. But every time I connect to the server a new connection is created using a different port. That will be a big overhead for the server. How can retrieve the information I want using the same connection?
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you closing the connection? Then no. The only thing I can see is using a multi-threaded server model to handle all the connections and do't disonect till the user leaves the page.
 
Manu Pandrea
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The idea is that I want to use the same socket connection on the client side and on the web server side to use the same session. So every 2 seconds when the applet try to retreive the information to use the same connection
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic