Interface IMessageStream
Represents a stream that may be registered to receive messages from the IMessaging feature.
Namespace: PushTechnology.ClientInterface.Client.Features
Assembly: Diffusion.Client.dll
Syntax
public interface IMessageStream : IStream, ICallback
Remarks
Deprecated: One-way messaging is deprecated in favor of request-response messaging. See SendRequestAsync<TRequest, TResponse>(String, TRequest). This interface will be removed in a future release.
If the stream is removed, OnClose() will be called.
If the session is closed, OnError(ErrorReason) will be called with the reason SESSION_CLOSED.
Since 5.1
Methods
OnMessageReceived(String, IContent, IReceiveContext)
Called if a message has been received for a specific path.
Declaration
void OnMessageReceived(string topicPath, IContent content, IReceiveContext context)
Parameters
Type | Name | Description |
---|---|---|
String | topicPath | The path to which the message was sent |
IContent | content | The message content. If the content is known to be of a certain IDataType, ReadValue(IBytes) may be used to convert it. |
IReceiveContext | context | The receive context. |
Remarks
How this originates and what the content contains is dependent on the sender of the message.