开发者

TCP sockets in Comet programming

开发者 https://www.devze.com 2022-12-15 22:32 出处:网络
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 ser开发者_运维知识库ver is never going to end, does

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 ser开发者_运维知识库ver is never going to end, does that mean the web server will always keep the temporary port open for infinite period ?


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.


It will be open until the server or the client closes the connection.

0

精彩评论

暂无评论...
验证码 换一张
取 消