Class StreamMessage
Represents message which content is represented by Stream.
Namespace: DotNext.Net.Cluster.Messaging
Assembly: DotNext.Net.Cluster.dll
Syntax
public class StreamMessage : StreamTransferObject, IDisposableMessage, IMessage, IDataTransferObject, IDisposable, IAsyncDisposable
Constructors
| Improve this Doc View SourceStreamMessage(Stream, Boolean, String, ContentType)
Initializes a new message.
Declaration
public StreamMessage(Stream content, bool leaveOpen, string name, ContentType type = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | content | The message content. |
| Boolean | leaveOpen | true to leave the stream open after StreamMessage object is disposed; otherwise, false. |
| String | name | The name of the message. |
| ContentType | type | Media type of the message. |
StreamMessage(String, ContentType, Int32, Boolean)
Initializes a new empty message of predefined size.
Declaration
public StreamMessage(string name, ContentType type, int size = 1024, bool growable = true)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The name of the message. |
| ContentType | type | Media type of the message. |
| Int32 | size | The initial size of the message, in bytes. |
| Boolean | growable | true if the size is not fixed and can be expanded if necessary; false to use strictly limited memory size. |
Properties
| Improve this Doc View SourceName
Gets name of this message.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
Type
Gets media type of this message.
Declaration
public ContentType Type { get; }
Property Value
| Type | Description |
|---|---|
| ContentType |