Comet Programming in IIS

后端 未结 4 1694
有刺的猬
有刺的猬 2021-01-03 03:56

It is said that IIS is not recommended for Comet programming. If that is true, how is it that other web servers are able to handle this vis a vis IIS. So what is it that oth

4条回答
  •  孤街浪徒
    2021-01-03 04:45

    A Comet connection means an HTTP connection between the server and the client (the Web page itself) which is left open for a longer time period. The server needs to have the following capabilities set up correctly:

    1. Multiple parallel connections to the same browser (the maximum number of connections per client has to be set to at least 2)
    2. The connection timeout (inactivity) has to be set high enough and the Web page must be capable of re-initiating lost Comet connections.
    3. The server has to be able to run server-side scripts for an extended time period, so the "processing timeout" has to be set high enough, e.g. 1800 seconds or so.
    4. It is useful to support HTTP 1.1, but not required for Comet.

    The easiest way is to use a JavaScript framework with built-in support for Comet. See the framework's manual for more instructions on how to configure various Web servers (like IIS) correctly for Comet.

提交回复
热议问题