LiveClient
public class LiveClient
Live Web Socket Client
-
Connection is open
Declaration
Swift
public var isConnected:Bool -
Delegate that handles events
Declaration
Swift
public var delegate:LiveClientDelegate?
-
Initializes a new LiveClient.
Declaration
Swift
public init(clientId:String, threadId:String? = nil, sessionId:String? = nil, endpoint:String? = nil)Parameters
clientIdGet your clientId from the dashboard
threadIdOptional threadId. If not specified we will generate and store one for this specific app
sessionIdOptional sessionId
eindpointOptional 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
threadIdOptional 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
didSendMessageon the delegate. The LiveCLient must be connected.Declaration
Swift
public func send(_ message:Any)Parameters
messageThis 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
threadIdThe thread that is noticed *
View on GitHub
Install in Dash
LiveClient Class Reference