C# Class Incog.Messaging.TextMessage

Text messaging layer class for coordinating a message pipeline in channels such as DNS.
Afficher le fichier Open project: SimWitty/Incog

Méthodes publiques

Méthode Description
Clear ( ) : void

Clear the message fragments, set Complete to False, and preserve the message identifier.

Get ( int index ) : byte[]

Gets the value of the Byte array at the specific position in the Fragments array.

GetBytes ( ) : byte[]

Returns the completed message as an array of Bytes.

GetDecryptedMessage ( System passphrase ) : string

Decrypts the fragments values of this instance into a clear text message string using the passphrase.

Set ( int index, byte value ) : void

Sets the Byte array at a specific position in the Fragments array to a specific value.

TextMessage ( ushort identifier ) : System

Initializes a new instance of the TextMessage class.

TextMessage ( ushort identifier, ushort fragmentCount ) : System

Initializes a new instance of the TextMessage class.

Method Details

Clear() public méthode

Clear the message fragments, set Complete to False, and preserve the message identifier.
public Clear ( ) : void
Résultat void

Get() public méthode

Gets the value of the Byte array at the specific position in the Fragments array.
public Get ( int index ) : byte[]
index int The zero-based index of the Byte array fragment to get.
Résultat byte[]

GetBytes() public méthode

Returns the completed message as an array of Bytes.
public GetBytes ( ) : byte[]
Résultat byte[]

GetDecryptedMessage() public méthode

Decrypts the fragments values of this instance into a clear text message string using the passphrase.
public GetDecryptedMessage ( System passphrase ) : string
passphrase System Decryption key
Résultat string

Set() public méthode

Sets the Byte array at a specific position in the Fragments array to a specific value.
public Set ( int index, byte value ) : void
index int The zero-based index of the byte array fragment to get.
value byte The Byte array value to assign to the fragment.
Résultat void

TextMessage() public méthode

Initializes a new instance of the TextMessage class.
public TextMessage ( ushort identifier ) : System
identifier ushort The unique identifier number of the message.
Résultat System

TextMessage() public méthode

Initializes a new instance of the TextMessage class.
public TextMessage ( ushort identifier, ushort fragmentCount ) : System
identifier ushort The unique identifier number of the message.
fragmentCount ushort The number of fragments in the message.
Résultat System