AposFeedingBot
AposFeedingBot copied to clipboard
communication problems
Hi Apos :-),
do you have an idea how can i communicate bewteen pulviscriptor's multiple.js and an google chrome extension ?
greets, David
I wish I did, but I've never done that before.
you would need an extension that would create a websocket between chrome and your nodejs app.
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.