AposFeedingBot icon indicating copy to clipboard operation
AposFeedingBot copied to clipboard

communication problems

Open agarioBotDev opened this issue 9 years ago • 3 comments

Hi Apos :-),

do you have an idea how can i communicate bewteen pulviscriptor's multiple.js and an google chrome extension ?

greets, David

agarioBotDev avatar Dec 20 '15 11:12 agarioBotDev

I wish I did, but I've never done that before.

Apostolique avatar Dec 29 '15 20:12 Apostolique

you would need an extension that would create a websocket between chrome and your nodejs app.

henopied avatar Jan 02 '16 01:01 henopied

I tried connecting via socket.io, adding this to multiple.js:

function startServerTest() {
    var Server = require('socket.io').listen(3000).sockets;

    Server.on('connection', function (socket) {
        console.log('connected');

        socket.on('party', function (party) {
            var log = party.party;
            console.log('new party: ' + log);
        });

    });

}

when i try to connect with my extension and do (in the extension):

testSocket.emit('party', { party:  'something' }); // testSocket is already connected to multiple.js 

it seems to work, because it logs 'connected' but multiple.js do not receive any data.....

by the way: you can only connect 4 bots on a party server with one ip, how can i avoid this ? something like a proxy ? ;-) an idea would be great.

agarioBotDev avatar Jan 22 '16 15:01 agarioBotDev