TWSStream Class Reference
Inherits from | NSObject |
---|---|
Declared in | TWSStream.h |
Overview
Interface for Sync Pub-sub messaging primitive.
Message Stream is a Sync primitive for real-time pub-sub messaging. Stream Messages are not persisted, they exist only in transit, and will be dropped if (due to congestion or network anomalies) they cannot be delivered promptly.
– sid
An immutable system-assigned identifier of this Message Stream.
- (nonnull NSString *)sid
Return Value
A string containing Message Stream SID.
Discussion
An immutable system-assigned identifier of this Message Stream.
Declared In
TWSStream.h
– uniqueName
An optional unique name for this stream, assigned at creation time.
- (nullable NSString *)uniqueName
Return Value
The unique name.
Discussion
An optional unique name for this stream, assigned at creation time.
Declared In
TWSStream.h
– publishMessageWithData:flowId:completion:
Publish a new message to this message stream.
- (void)publishMessageWithData:(nonnull TWSData *)data flowId:(NSUInteger)flowId completion:(nullable TWSStreamMessageCompletion)completion
Parameters
data |
Contains the payload of the dispatched message. Maximum size in serialized JSON: 4KB. |
---|---|
flowId |
Specifies the flow identifier associated with this message publication. |
completion |
Completion block that will specify the result of the operation and the unique message identifier if the operation is successful. |
Discussion
Publish a new message to this message stream.
Declared In
TWSStream.h
– removeStreamWithFlowId:completion:
Remove the stream from the system, deleting it.
- (void)removeStreamWithFlowId:(NSUInteger)flowId completion:(nullable TWSCompletion)completion
Parameters
flowId |
A developer specified identifier for this remote request. |
---|---|
completion |
Completion block that will specify the result of the operation. |
Discussion
Remove the stream from the system, deleting it.
Declared In
TWSStream.h