• Post Reply Bookmark Topic Watch Topic
  • New Topic

Repetitive acces to server using the same URLConnection  RSS feed

 
Manu Pandrea
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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?
 
J Kneeland
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!