Closed timwis closed 8 years ago
.send()
does not seem to throw an error if the client is disconnected. Reported to einaros/sse.js#17 and ngnjs/ngn-sse#1
Also found that IE doesn't support SSEs... :/
Going to close this one because of the lack of IE support. We'll go with sockets for now.
The see.js library gives you a
connection
event. We can store the list of clients, then create abroadcast
function that loops through each client and calls.send()
on it. If it fails, remove the client from the list of clients (since there's nodisconnect
event).