DITBusStreamDelegate
@protocol DITBusStreamDelegate <NSObject>
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.
errorwill be non-nil if the operation failed.Declaration
Objective-C
- (void)ditBusStream:(DITBusStream *)busStream didEnqueueDataWithMessageSequence:(uint64_t)messageSequence error:(NSError *)error; -
The stream has closed. This can be triggered by calling
close()or by the remote peer doing the same.Declaration
Objective-C
- (void)ditBusStream:(DITBusStream *)busStream didClose:(NSError *)error; -
A new message has been received from the specified stream.
Declaration
Objective-C
- (void)ditBusStream:(DITBusStream *)busStream didReceiveMessage:(NSData *)message; -
The remote peer has acknowledged receipt of all messages up to the given sequence number.
Declaration
Objective-C
- (void)ditBusStream:(DITBusStream *)busStream didAcknowledgeReceipt:(uint64_t)messageSequence;
DITBusStreamDelegate Protocol Reference