DittoBusStreamDelegate
public protocol DittoBusStreamDelegate : AnyObject
Callbacks required to use the Ditto Bus API with explicit stream handles.
-
The operation to enqueue outgoing data on a stream has completed. More data may now be enqueued.
The message sequence number may be used to track when the remote side has fully acknowledged receipt.
error
will be non-nil if the operation failed.Declaration
Swift
func dittoBusStream(_ busStream: DittoBusStream, didEnqueueDataWithMessageSequence messageSequence: UInt64, error: DittoSwiftError?)
-
The stream has closed. This can be triggered by calling
close()
or by the remote peer doing the same.Declaration
Swift
func dittoBusStream(_ busStream: DittoBusStream, didClose error: DittoSwiftError)
-
A new message has been received from the specified stream.
Declaration
Swift
func dittoBusStream(_ busStream: DittoBusStream, didReceiveMessage message: Data)
-
The remote peer has acknowledged receipt of all messages up to the given sequence number.
Declaration
Swift
func dittoBusStream(_ busStream: DittoBusStream, didAcknowledgeReceipt messageSequence: UInt64)