Skip to content

Instantly share code, notes, and snippets.

@amitrahav
Created May 14, 2021 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitrahav/e4899fb69add52b53577b70ab62bb1c3 to your computer and use it in GitHub Desktop.
Save amitrahav/e4899fb69add52b53577b70ab62bb1c3 to your computer and use it in GitHub Desktop.
SocketVsSSE
// Listen for possible errors
evtSource.onerror = function() {
console.log("EventSource failed.");
};
// Listen for possible errors
socket.addEventListener("error", function (event) {
console.log("WebSocket error:", event);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment