SimpleTCP.Message.Reply C# (CSharp) Method

Reply() public method

public Reply ( byte data ) : void
data byte
return void
        public void Reply(byte[] data)
        {
            _tcpClient.GetStream().Write(data, 0, data.Length);
        }

Same methods

Message::Reply ( string data ) : void

Usage Example

示例#1
0
        private void Server_DataReceived(object sender, SimpleTCP.Message e)
        {
            /*textBox3.Invoke((MethodInvoker)delegate () {
             *   textBox3.Text += e.MessageString;
             *  e.Reply(string.Format("You said: {0}" ,  e.MessageString));
             * }
             * );*/

            //Корень сервера

            textBox3.Invoke((MethodInvoker) delegate() {
                textBox3.Text    += e.MessageString;
                string g          = e.MessageString;
                g                 = g.Substring(0, g.Length - 1);
                string gh         = "", d = "";
                DirectoryInfo dir = new DirectoryInfo(g);
                foreach (var item in dir.GetDirectories())
                {
                    gh += item.Name + " ";
                    foreach (var it in item.GetDirectories())
                    {
                        d += it.Name + "";
                    }
                }


                e.Reply(string.Format(gh + d, e.MessageString));
            }
                            );
        }
All Usage Examples Of SimpleTCP.Message::Reply