We'll look into this and see if we can reproduce what you're seeing.
Hi, We are using turboactivate in our application and trying to integrate turbofloat as well. Now, I know that before requesting a lease I should set server details and therefore calling tf.SaveServer("127.0.0.1", 13, TF_USER) but the callback are never called and systfProc just waits for data to be received so that it can call the callback with the data. Do you have any suggestion? I am using the latest version as I am only trying it recently and therefore doesn't have previous version to try.
Thanks
We'll look into this and see if we can reproduce what you're seeing.
We can't reproduce this. Can you provide code that reproduces the behavior you're seeing?
Sorry, I had to move on different project for a moment. Please find attach both the client & server I am running at the moment. I have removed the GUID from index.js from client. I could do telnet to server from same machine and it will print the console message on connection received. But when I run the client (index.js) it will just wait for saveServer to finish and without the right server details it will never ping the server
https://www.dropbox.com/s/3j1xpfwo3n9mljl/prototype.zip?dl=0
Hi, Just checking if anyone in your team manage to test this?
Thanks, Rahul!
We were able to reproduce the problem and fix it. The fixed turbofloat.js
file will be in the next release, but in the meantime, you can alter the SaveServer
function like so:
this.SaveServer = function(hostAddr, port, flags = TF_USER) {
if (FunctionProcessing !== -1)
return new Promise(alreadyRunningFail);
// sanity check -- a value must be passed in
if (typeof hostAddr !== 'string' || typeof port !== 'number')
return new Promise(invalidArgsFail);
FunctionProcessing = FUNC_SaveServer;
let buf = Buffer.allocUnsafe(12 + hostAddr.length);
buf.writeInt32LE(FunctionProcessing, 0);
buf.writeInt16LE(hostAddr.length, 4);
// write the host address without the trailing null
buf.write(hostAddr, 6, hostAddr.length, 'utf8');
// write the port
buf.writeUInt16LE(port, 6 + hostAddr.length);
// write the flags
buf.writeUInt32LE(flags, 8 + hostAddr.length);
systfProc.stdin.write(buf);
return new Promise(function(resolve, reject) {
promiseResolve = resolve;
promiseReject = reject;
});
};
Great, it worked now. Thanks