Example #1
0
        void DisplayReceivedMessage(byte[] message)
        {
            tbReceived.Clear();

            ASCIIEncoding encoder = new ASCIIEncoding();
            string        str     = encoder.GetString(message, 0, message.Length);

            if (str == "close")
            {
                pipeClient.Disconnect();

                CreateNewPipeClient();
                pipeClient.Connect(tbPipeName.Text);
            }

            tbReceived.Text += str + "\r\n";
        }