docs/Classes/SocketAckEmitter.html
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.
`
rawEmitView
`
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.
Swift
@objc
public private(set) lazy var rawEmitView: SocketRawAckView { get set }
Properties
`
expected
`
If true, this handler is expecting to be acked. Call with(_: SocketData...) to ack.
Swift
public var expected: Bool { get }
Initializers
`
init(socket:ackNum:)
`
Creates a new SocketAckEmitter.
Swift
public init(socket: SocketIOClient, ackNum: Int)
| socket |
The socket for this emitter.
|
| ackNum |
The ack number for this emitter.
|
Methods
`
with(_:)
`
Call to ack receiving this event.
If an error occurs trying to transform items into their socket representation, a SocketClientEvent.error will be emitted. The structure of the error data is [ackNum, items, theError]
Swift
public func with(_ items: SocketData...)
| items |
A variable number of items to send when acking.
|
`
with(_:)
`
Call to ack receiving this event.
Swift
@objc
public func with(_ items: [Any])
| items |
An array of items to send when acking. Use [] to send nothing.
|