Skip to content

Commit 51ee965

Browse files
authored
Merge pull request #557 from naderio/master
add SocketAckEmitter.expected to indicate if an ack is expected by server
2 parents 8618152 + ea3fca3 commit 51ee965

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Source/SocketAckEmitter.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ import Foundation
2727
public final class SocketAckEmitter : NSObject {
2828
let socket: SocketIOClient
2929
let ackNum: Int
30+
31+
public var expected: Bool {
32+
return ackNum != -1
33+
}
3034

3135
init(socket: SocketIOClient, ackNum: Int) {
3236
self.socket = socket
@@ -44,6 +48,7 @@ public final class SocketAckEmitter : NSObject {
4448

4549
socket.emitAck(ackNum, with: items)
4650
}
51+
4752
}
4853

4954
public final class OnAckCallback : NSObject {

0 commit comments

Comments
 (0)