SocketEventHandler

public struct SocketEventHandler

A wrapper around a handler.

  • The event for this handler.

    Declaration

    Swift

    public let event: String
  • id

    A unique identifier for this handler.

    Declaration

    Swift

    public let id: UUID
  • The actual handler function.

    Declaration

    Swift

    public let callback: NormalCallback
  • Causes this handler to be executed.

    Declaration

    Swift

    public func executeCallback(with items: [Any], withAck ack: Int, withSocket socket: SocketIOClient)

    Parameters

    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.