]> git.cworth.org Git - empires-server/commit
Rename broadcast() to broadcast_event() supported by broadcast_string()
authorCarl Worth <cworth@cworth.org>
Sun, 10 May 2020 15:35:21 +0000 (08:35 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 10 May 2020 15:39:05 +0000 (08:39 -0700)
commita2173a80f7c55b1c6d1fedb9c4afdf77e7cc8e37
treed4bdca64815a4e40dd56fe303678852d072916c6
parent076e7e1322412fcce748bfff13f6d50e8e46564a
Rename broadcast() to broadcast_event() supported by broadcast_string()

The lower-level broadcast_string() simply sends a string to all clients.

The higher-level broadcast_event() sends a structured event (with both an
event type and a separate data block, as well as ending with two newlines),
exactly as clients will be expecting.
server.js