Socketio.blast()

Blast out a message to all connected sockets.

This will send a message to EVERY socket connected to an app, as opposed to "Broadcast" which only sends messages to a specific room. Note that this machine does not wait for any kind of acknowledgement of message delivery, so it is immediate/synchronous.

Usage

Hover over inputs/exits for more info.

var Socketio = require('machinepack-sockets');


// Blast out a message to all connected sockets.

Socketio.blast({

eventName: 'news',

data: '*',

}).execSync();

Inputs

eventName required

The name (aka "event name") to use for the message (just an arbitrary label).

'news'
data

Data to send with the message.

'*'

Exits

error

An unexpected error occurred.

success

OK.