@@ -283,8 +283,8 @@ module SocketIO {
283
283
SendNode getASender ( ) { result .getAReceiver ( ) = this }
284
284
285
285
/** Gets the acknowledgment callback, if any. */
286
- DataFlow :: SourceNode getAck ( ) {
287
- result .( ReceiveCallback ) . getReceiveNode ( ) = this
286
+ ReceiveCallback getAck ( ) {
287
+ result .getReceiveNode ( ) = this
288
288
}
289
289
290
290
/** DEPRECATED. Use `getChannel()` instead. */
@@ -374,10 +374,8 @@ module SocketIO {
374
374
}
375
375
376
376
/** Gets the acknowledgment callback, if any. */
377
- DataFlow:: FunctionNode getAck ( ) {
378
- // acknowledgments are only available when sending through a socket
379
- exists ( getSocket ( ) ) and
380
- result = getLastArgument ( ) .getALocalSource ( )
377
+ SendCallback getAck ( ) {
378
+ result .getSendNode ( ) = this
381
379
}
382
380
383
381
/** DEPRECATED. Use `getChannel()` instead. */
@@ -576,8 +574,7 @@ module SocketIOClient {
576
574
577
575
/** Gets the acknowledgment callback, if any. */
578
576
DataFlow:: SourceNode getAck ( ) {
579
- result = getListener ( ) .getLastParameter ( ) and
580
- exists ( result .getAnInvocation ( ) )
577
+ result .( ReceiveCallback ) .getReceiveNode ( ) = this
581
578
}
582
579
583
580
/** Gets a server-side node that may be sending the data received here. */
@@ -664,9 +661,7 @@ module SocketIOClient {
664
661
665
662
/** Gets the acknowledgment callback, if any. */
666
663
DataFlow:: FunctionNode getAck ( ) {
667
- // acknowledgments are only available when sending through a socket
668
- exists ( getSocket ( ) ) and
669
- result = getLastArgument ( ) .getALocalSource ( )
664
+ result .( SendCallback ) .getSendNode ( ) = this
670
665
}
671
666
672
667
/** DEPRECATED. Use `getChannel()` instead. */
0 commit comments