packages/browser-sync/lib/sockets.js
function handleConnection(client) {
        // set ghostmode callbacks
        if (bs.options.get("ghostMode")) {
            addGhostMode(client);
        }

        client.emit("connection", bs.options.toJS()); //todo - trim the amount of options sent to clients

        emitter.emit("client:connected", {
            ua: client.handshake.headers["user-agent"]
        });
    }
function handleConnection(client) {
        // set ghostmode callbacks
        if (bs.options.get("ghostMode")) {
            addGhostMode(client);
        }

        client.emit("connection", bs.options.toJS()); //todo - trim the amount of options sent to clients

        emitter.emit("client:connected", {
            ua: client.handshake.headers["user-agent"]
        });
    }
function handleConnection ( client ) { // set ghostmode callbacks if ( bs . options . get ( "ghostMode" ) ) { addGhostMode ( client ) ; } client . emit ( "connection" , bs . options . toJS ( ) ) ; //todo - trim the amount of options sent to clients emitter . emit ( "client:connected" , { ua : client . handshake . headers [ "user-agent" ] } ) ; }
Handle each new connection
@param {Object} client
Handle each new connection