SocketAckEmitter
public final class SocketAckEmitter : NSObject
A class that represents a waiting ack call.
NOTE: You should not store this beyond the life of the event handler.
-
A view into this emitter where emits do not check for binary data.
Usage:
ack.rawEmitView.with(myObject)NOTE: It is not safe to hold on to this view beyond the life of the socket.
Declaration
Swift
@objc public private(set) lazy var rawEmitView: SocketRawAckView { get set }
-
If true, this handler is expecting to be acked. Call
with(_: SocketData...)to ack.Declaration
Swift
public var expected: Bool { get }
-
Creates a new
SocketAckEmitter.Declaration
Swift
public init(socket: SocketIOClient, ackNum: Int)Parameters
socketThe socket for this emitter.
ackNumThe ack number for this emitter.
-
Call to ack receiving this event.
If an error occurs trying to transform
itemsinto their socket representation, aSocketClientEvent.errorwill be emitted. The structure of the error data is[ackNum, items, theError]Declaration
Swift
public func with(_ items: SocketData...)Parameters
itemsA variable number of items to send when acking.
-
Call to ack receiving this event.
Declaration
Swift
@objc public func with(_ items: [Any])Parameters
itemsAn array of items to send when acking. Use
[]to send nothing.
SocketAckEmitter Class Reference