UpstreamDataSendable
public protocol UpstreamDataSendable : AnyObject
A protocol for sending Upstream data to the server.
-
Sends an event.
Declaration
Swift
func sendEvent(_ event: Upstream.Event, completion: ((StreamDataState) -> Void)?)Parameters
eventThe event to send.
completionThe completion handler to call when the request is complete.
-
Sends an event and keep the stream for future attachment
Declaration
Swift
func sendStream(_ event: Upstream.Event, completion: ((StreamDataState) -> Void)?)Parameters
eventThe event to send.
completionThe completion handler to call when the request is complete.
-
Sends an attachment using the stream set before.
Every event and attachment have
DialogRequestIdand this method finds the suitable stream using that id.Declaration
Swift
func sendStream(_ attachment: Upstream.Attachment, completion: ((StreamDataState) -> Void)?)Parameters
attachmentThe attachmen to send.
completionThe completion handler to call when the request is complete.
-
Cancels an event.
Declaration
Swift
func cancelEvent(dialogRequestId: String)Parameters
dialogRequestIdThe event’s
dialogRequestIdto cancel. -
sendEvent(_:Extension method) Sends an event.
Declaration
Swift
func sendEvent(_ event: Upstream.Event)Parameters
eventThe event to send.
-
sendStream(_:Extension method) Sends an attachment using the stream set before.
Every event and attachment have
DialogRequestIdand this method finds the suitable stream using that id.Declaration
Swift
func sendStream(_ attachment: Upstream.Attachment)Parameters
attachmentThe attachmen to send.
View on GitHub
UpstreamDataSendable Protocol Reference