docs/Structs/SocketEventHandler.html
public struct SocketEventHandler
A wrapper around a handler.
Properties
`
event
`
The event for this handler.
Swift
public let event: String
`
id
`
A unique identifier for this handler.
Swift
public let id: UUID
`
callback
`
The actual handler function.
Swift
public let callback: NormalCallback
Methods
`
executeCallback(with:withAck:withSocket:)
`
Causes this handler to be executed.
Swift
public func executeCallback(with items: [Any], withAck ack: Int, withSocket socket: SocketIOClient)
| with |
The data that this handler should be called with.
|
| withAck |
The ack number that this event expects. Pass -1 to say this event doesn’t expect an ack.
|
| withSocket |
The socket that is calling this event.
|