C# Class 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.
Afficher le fichier Open project: nats-io/csnats Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
Msg ( MsgArg arg, Subscription s, byte payload, long length ) : System
init ( string subject, string reply, byte data ) : void

Method Details

AssignData() public méthode

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.
Résultat void

Msg() public méthode

Creates an empty message.
public Msg ( ) : System
Résultat System

Msg() public méthode

Creates a message with a subject and no payload.
public Msg ( string subject ) : System
subject string Subject of the message, required.
Résultat System

Msg() public méthode

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
Résultat System

Msg() public méthode

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
Résultat System

ToString() public méthode

Generates a string representation of the messages.
public ToString ( ) : string
Résultat string