3 ms·
Please show me how a server can send two consecutive messages to a long-polling client without requiring the client to make a request between the receipt of mes
by jessedhillon 16y ago
Please show me how a server can send two consecutive messages to a long-polling client without requiring the client to make a request between the receipt of message 1 and message 2.
- deleted 16y ago[deleted]
- deleted 16y ago[deleted]
- weixiyen 16y agoI'm not sure what you are replying to as it's been redacted, but just wanted to say that there's really nothing wrong with that technique. Developers tend to way overestimate the cost of a long polling request with minimal headers. Also the speed benefit of websockets over long polling is so trivial that it doesn't really matter.
- ericflo 16y agoI could not agree more with this comment.
- jessedhillon 16y agoA couple of posts were deleted on this thread, perhaps because the authors realized they were mistaken. The claim was that long-polling and WebSockets are bi-directional in the same sense, and mine was that one type of bi-directionality is simulated and has real limitations. It doesn't matter if the overhead is low: with long-polling, the server can't send a waiting message until the client requests them. With true sockets, the server can send messages as soon as they are available.