How does the live, real-time typing work in Google Wave?

后端 未结 9 1644
终归单人心
终归单人心 2021-01-30 05:29

I\'m sure Wave doesn\'t poll the server every millisecond to find out if the other user has typed something... so how can I see what the other person is typing as they type? And

9条回答
  •  说谎
    说谎 (楼主)
    2021-01-30 05:55

    I would assume that they use ajax requests. Do an XMLHttpRequest, which is asynchronous, and when the server has something to send your browser the javascript callback that was registered gets the data and does whatever with it. So basically the browser requests the next event, handles it, repeats indefinitely.

提交回复
热议问题