Closed jacky727 closed 8 years ago
Is this still an issue for you?
hello,Chris Matthieu: Thanks for your reply. This problem has not been solved. Today, I'm trying to use the release version 1.14.13 for testing, but it doesn't work yet. My test environment: OS:Ubuntu Server 15.10 node: 0.12.9
在 2015-12-11 01:36:13,"Chris Matthieu" notifications@github.com 写道:
Is this still an issue for you?
— Reply to this email directly or view it on GitHub.
/ client side */ var Meshblu = require('meshblu'); var meshblu = Meshblu.createConnection({ uuid: 'client-uuid', token: 'client-token' });
meshblu.message({ "devices":"server-uuid", "topic":"status", "payload":{ "online":true } }, //callback function(echoMessage) { if(echoMessage.error){ console.log(echoMessage.error); //always { "error": "timeout 10000" } } else{ console.log(echoMessage); } });
/ server side */ var Meshblu = require('meshblu'); var meshblu = Meshblu.createConnection({ uuid: 'server-uuid', token: 'server-token' });
meshblu.on('message', function(message, callback){ console.log(message);//received the message from the client side callback(message); //echo message );
I don't know why client side callback has not been executed until the timeout, but it works in version ‘1.1.1’, The current version is ‘1.4.1’.