oren — 4/17/2022, 10:55:47 PM

I am now hacking wasteof’s socket.io. Already found 1 bug

↩ repost
oren — 4/17/2022, 10:47:02 PM

jeffalo has a redirect button which can send all online users to a new url. he’s used it several times.

Here’s the client side code:

o.on("redirect", (function(t) {
  window.location.href = t
})),

(pretty simple)

How it works: when online, all browser tabs connect to a socket.io server. this is how you get real-time stuff like live messages count. It sends a message telling everyone’s browser to redirect. This is the most genius use of socket.io I’ve ever heard

♥ 3 ↩ 1 💬 4 comments
♥ 1 ↩ 0 💬 0 comments

comments

no comments