How to use the socket.io-client.connect function in socket

To help you get started, we’ve selected a few socket examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github volumio / Volumio2 / utils / pluginapi / uninstallPlugin.js View on Github external
/**
 * Created by massi on 30/08/15.
 */
var io=require('socket.io-client');

var socket= io.connect('http://localhost:3000');

console.log("GET BrowseLibrary\n\n");
socket.emit('unInstallPlugin', { category:'music_services',name:''});

socket.on('installPluginStatus',function(data)
{
    console.log(data);
//console.log(JSON.parse(data));
});
github volumio / Volumio2 / app / plugins / system_controller / volumio_command_line_client / commands / status.js View on Github external
#!/bin/node
var io=require('socket.io-client');

var socket= io.connect('http://localhost:3000');

socket.emit('getState', '');

socket.on('pushState',function(data)
{
    console.log(data);
    process.exit()
});
github volumio / Volumio2 / utils / pluginapi / enablePlugin.js View on Github external
/**
 * Created by massi on 30/08/15.
 */
var io=require('socket.io-client');

var socket= io.connect('http://localhost:3000');


socket.emit('setBackgrounds',{name:'Morning',path:'morning.jpg'});

socket.on('pushBackgrounds',function(data)
{
    console.log(data);
//console.log(JSON.parse(data));
});
github volumio / Volumio2 / utils / pluginapi / preuninstallPlugin.js View on Github external
/**
 * Created by massi on 30/08/15.
 */
var io=require('socket.io-client');

var socket= io.connect('http://localhost:3000');

console.log("GET BrowseLibrary\n\n");
socket.emit('preUninstallPlugin', { category:'music_service',name:'spop'});

socket.on('openModal',function(data)
{
    console.log(data);
//console.log(JSON.parse(data));
});
github volumio / Volumio2 / app / plugins / system_controller / volumio_command_line_client / commands / setvolume.js View on Github external
#!/bin/node
var io=require('socket.io-client');
var socket= io.connect('http://localhost:3000');
var volume = Number(process.argv.slice(2));

socket.emit('volume', volume);

socket.on('pushState',function(data)
{
    console.log('Volume is now: '+data.volume);
    process.exit()
});

socket

CLI tool for Socket.dev

MIT
Latest version published 3 days ago

Package Health Score

76 / 100
Full package analysis