4 ms·
> which uses event source > If the client sent some data down the connection to the server. Unfortunately the eventsource specification doesn’t provide any way
by est 12y ago
> which uses event source
> If the client sent some data down the connection to the server. Unfortunately the eventsource specification doesn’t provide any way to do this;
Solution: use websocket, which the client can actively ping the server.
- josteink 12y agoIt's not "just" use websockets. These may be intercepted by proxies with connection limits, timeouts or just plain not understanding websockets at all. You will need to detect this and apply a fallback mechanism. Which goes back to the point of this post: easy in theory. Much harder in practice. Where I work we ended up using Microsoft's signalr-library to avoid having to learn and tackle all of these issues ourselves. Yet we still needed to add some additional Band-Aids around the libraries provided to be able to support all cases we wanted seamlessly.