TWSStreamDelegate Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | TWSStream.h |
Overview
The delegate delivers events that are fired by the Message Stream as a result of asynchronous completion of locally invoked methods, or any remote operations triggered by other actors on the same Stream.
– onStreamOpened:
Called when the message stream is opened or created.
- (void)onStreamOpened:(nonnull TWSStream *)streamParameters
stream |
The reference to the message stream. |
|---|
Discussion
Called when the message stream is opened or created.
Declared In
TWSStream.h
– onStream:removedWithEventContext:
Called when the stream is removed.
- (void)onStream:(nonnull TWSStream *)stream removedWithEventContext:(nonnull TWSEventContext *)eventContextParameters
stream |
The reference to the message stream. |
|---|---|
eventContext |
Context for this event. |
Discussion
Called when the stream is removed.
Declared In
TWSStream.h
– onStream:messagePublished:eventContext:
Called when the stream message is published, either as a result of a local operation or remotely.
- (void)onStream:(nonnull TWSStream *)stream messagePublished:(nonnull TWSStreamMessage *)message eventContext:(nonnull TWSEventContext *)eventContextParameters
stream |
The reference to the message stream. |
|---|---|
message |
The published message. |
eventContext |
Context for this event. |
Discussion
Called when the stream message is published, either as a result of a local operation or remotely.
Declared In
TWSStream.h
– onStream:errorOccurred:
Called when an error occurs.
- (void)onStream:(nonnull TWSStream *)stream errorOccurred:(nonnull TWSError *)errorParameters
stream |
The reference to the message stream. |
|---|---|
error |
The error encountered. The error object will include the error status code, extended error code and and error message. |
Discussion
Called when an error occurs.
This event is fired whenever any Message Stream errors occur, typically resulting from a locally requested operation. Notable error conditions include stream being non-existent, inaccessible or message publications rate being too high.
Declared In
TWSStream.h