LiveClient

public class LiveClient

Live Web Socket Client

  • Initializes a new LiveClient.

    Declaration

    Swift

    public init(clientId:String, threadId:String? = nil, sessionId:String? = nil, endpoint:String? = nil)

    Parameters

    clientId

    Get your clientId from the dashboard

    threadId

    Optional threadId. If not specified we will generate and store one for this specific app

    sessionId

    Optional sessionId

    eindpoint

    Optional endpoint

    Return Value

    LiveClient instance

  • Open the connection. The LiveClient will auto reconnect when the connection is interrupted. *

    Declaration

    Swift

    public func start()
  • Close the connection *

    Declaration

    Swift

    public func stop()
  • Load previous send and received activities. The LiveCLient must be connected.

    Declaration

    Swift

    public func loadHistory(_ threadId:String? = nil)

    Parameters

    threadId

    Optional threadId. By default the threadId is used when creating the LiveClient *

  • Undocumented

    Declaration

    Swift

    public class LiveClient
  • Undocumented

    Declaration

    Swift

    public class LiveClient
  • Send a new Message. When a Message is send it will call the didSendMessage on the delegate. The LiveCLient must be connected.

    Declaration

    Swift

    public func send(_ message:Any)

    Parameters

    message

    This should be either an instance of a Message, Ping or Notice *

  • Call to inidicate the user has noticed all activities. The LiveCLient must be connected.

    Declaration

    Swift

    public func notice(_ threadId:String)

    Parameters

    threadId

    The thread that is noticed *