Socketio.isSocketRequest()

Determine whether or not the incoming request was made via socket.io.

Returns `true` if the request was made via socket.io, and `false` otherwise (e.g. if it was made via a browser or AJAX request).

Usage

Hover over inputs/exits for more info.

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


// Determine whether or not the incoming request was made via socket.io.

Socketio.isSocketRequest({

}).execSync();

Inputs

Exits

error

An unexpected error occurred.

success

OK.

true