export function publish(socket, event) { const payload = JSON.stringify(event); socket.send(payload); }