Post

PipeMessage.DecodeString

Decodes MsgData to a string.


Remarks

Check that MsgCode is ‘0’ before decoding.


Syntax

SyntaxDescription
DecodeString()Decoder method to convert the byte[] MsgData array to a string. Should only be called if the array originated from a string.

Returns

TypeDescription
stringThe 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.

Trending Tags