• ultimaluz@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    5 hours ago

    for a multiplayer browser game I ended up skipping websockets and using SSE for everything that goes server to client, and plain POST requests for the actions. it’s just http so the reverse proxy, cookies and reconnects work without doing anything special, and EventSource reconnects by itself. one gotcha if you use express with compression middleware, exclude the SSE route or the events get buffered and arrive in chunks. websockets make more sense if the client sends a lot, mine mostly listens