C# Класс NATS.Client.Msg

A NATS message is an object encapsulating a subject, optional reply payload, and subscription information, sent or received by teh client application.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AssignData ( byte data ) : void

Assigns the data of the message. This is a direct assignment, to avoid expensive copy operations. A change to the passed byte array will be changed in the message.

The application is responsible for the data integrity in the message.

Msg ( ) : System

Creates an empty message.

Msg ( string subject ) : System

Creates a message with a subject and no payload.

Msg ( string subject, byte data ) : System

Creates a message with a subject and data.

Msg ( string subject, string reply, byte data ) : System

Creates a message with a subject, reply, and data.

ToString ( ) : string

Generates a string representation of the messages.

Приватные методы

Метод Описание
Msg ( MsgArg arg, Subscription s, byte payload, long length ) : System
init ( string subject, string reply, byte data ) : void

Описание методов

AssignData() публичный Метод

Assigns the data of the message. This is a direct assignment, to avoid expensive copy operations. A change to the passed byte array will be changed in the message.
The application is responsible for the data integrity in the message.
public AssignData ( byte data ) : void
data byte a bytes buffer of data.
Результат void

Msg() публичный Метод

Creates an empty message.
public Msg ( ) : System
Результат System

Msg() публичный Метод

Creates a message with a subject and no payload.
public Msg ( string subject ) : System
subject string Subject of the message, required.
Результат System

Msg() публичный Метод

Creates a message with a subject and data.
public Msg ( string subject, byte data ) : System
subject string Subject of the message, required.
data byte Message payload
Результат System

Msg() публичный Метод

Creates a message with a subject, reply, and data.
public Msg ( string subject, string reply, byte data ) : System
subject string Subject of the message, required.
reply string Reply subject, can be null.
data byte Message payload
Результат System

ToString() публичный Метод

Generates a string representation of the messages.
public ToString ( ) : string
Результат string