-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch to read and write to return the sid #12
Comments
client.read('D00000', 5, function (err, bytes) { |
Mhhh..... This way I can see two different problems: I need to use a callback that otherwise I don't need, and because I'm using a single client to run multiple different read & write, and I need the SID to be able to identify the correct answer, so the "client" object in the meantime could have changed. |
The way I handle SIDs without the need for callbacks or for adding a return is in the client.on('reply'). Here I am expecting 17 SIDs and on getting them all we close the connection. They often do not arrive in order therefore we need an if / else or switch statement.
|
To be able to track multiple parallel requests, I simply added:
return self.header.SID;
to FinsClient.prototype.read and FinsClient.prototype.write.
It is possible to have this patch in the code?
Thank you.
GT
The text was updated successfully, but these errors were encountered: