Permalink
Browse files

Request remember its callback

when the corresponding Response comes, call callback
  • Loading branch information...
1 parent 4e94b4a commit 389147339274e8a7152f998f60422bb186e4fa9e @kaven276 committed Jun 4, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/nodes/nodeSP.js
View
@@ -93,7 +93,10 @@ SP.prototype.dumpQueue = function(){
this.sendQueue = [];
}
-SP.prototype.send = function(msg){
+SP.prototype.send = function(msg, callback){
+ if (callback) {
+ msg.callback = callback;
+ }
if (this.linkStatus) {
this.socket.write(msg.makePDU());
this.ackQueue.push(msg);

0 comments on commit 3891473

Please sign in to comment.