TCP sockets in Comet programming

A web server opens a temporary port while sending the response to the clients. In the case of comet programming(streaming), if the response from web server is never going to end, does that mean the web server will always keep the temporary port open for infinite period ?

Answers


Depends on the COMET technique:

  1. Client sends request to Server - Server sends data (when it has meaningful data to send ;-) - Client receives data - Client closes.

  2. Client sends request to Server - Server sends data in "chunk" (chunked transfer) keeping the connection open for as long as it can/instructed to.


Need Your Help

RepeatingSpriteBackground on MenuScene

android background andengine repeat

I have started using Andengine, and after following some tutorials I'm starting to develope for myself.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.