Use HTTP Keep-Alive for server to communicate to client

后端 未结 3 798
-上瘾入骨i
-上瘾入骨i 2021-02-07 09:41

Recently in an interview I was asked how I would approach an online chat client application. I went through the standard \"polling\" solution but was cut off because the interv

3条回答
  •  面向向阳花
    2021-02-07 10:05

    You might read more about Comet servers. That sounds basically like the approach that the interviewer was asking about. Their effectiveness is disputed by some, but it has been used in several similar situations.

    For example, I believe gmail uses comet technologies for some things (but don't quote me on it).

    Another example that seems relevant is BOSH, which is a protocol for transmitting chat information using HTTP and XMPP. But I don't believe that using keep-alive is involved in that.

提交回复
热议问题