PipeMessage.DecodeString
Decodes MsgData to a string.
Remarks
Check that MsgCode is ‘0’ before decoding.
Syntax
| Syntax | Description |
|---|---|
| DecodeString() | Decoder method to convert the byte[] MsgData array to a string. Should only be called if the array originated from a string. |
Returns
| Type | Description |
|---|---|
| string | The MsgData decoded to a string. |
Example
1
2
3
4
5
6
7
8
9
10
11
using Nova.IPC.Pipes;
PipesClient client = new PipesClient("NovaDemoServer");
client.ServerMessage += (connection, message) =>
{
if (message.MsgCode == '0')
{
Console.WriteLine("Server says: " + message.DecodeString());
}
};
client.Start();
This post is licensed under CC BY 4.0 by the author.