据我所知,在SSE(服务器发送事件)技术中,只要连接关闭,客户端就会尝试自动重新连接到服务器。我经历过谷歌,实际上我对SSE的运作方式感到困惑。
让我知道它的工作流程如下
client: send request "do you got any updates"
server: no updates
client: send request "do you got any updates"
server: no udates
....
......
client: send request "do you got any updates"
server: oh yes, now you got updates
OR
client: send request "do you got any updates"
server: wait a while I will let you know when I will got udates
......
.......
server: Hi you got updates, check it.
.....
.......
server: Hi again, you got updates.
感谢您注意到我!!!