PollMessageDelivery
public class PollMessageDelivery : MessageDelivering
Handles Long Polling mechanism to CAI Channel Connector to load messages
-
Declaration
Swift
public var onMessages: ((Result<CAIConversationResultData, CAIError>) -> Void)?
-
Undocumented
Declaration
Swift
public var channelToken: String?
-
Declaration
Swift
public var channelId: String
-
Declaration
Swift
public var lastMessageId: String?
-
Constructor
Declaration
Swift
public init(channelToken: String?, channelId: String, serviceConfig: CAIServiceConfig)
Parameters
channelId
String
serviceConfig
CAIServiceConfig
-
Start polling. Always return a publisher that emits true, never fails.
Declaration
Swift
public func reconnect() -> AnyPublisher<Bool, CAIError>
-
Declaration
Swift
public func initialize(_ conversationId: String)
-
Declaration
Swift
public func stop()
-
Declaration
Swift
public func start()