예제 #1
0
파일: FormMain.cs 프로젝트: bynanex/ZServer
        private void sendMessage(string message = "", bool manual = false)
        {
            if (!string.IsNullOrWhiteSpace(message))
            {
                _client?.receive();

                _client?.send(message);

                tb_chat_history.AppendText($@"[ Me ]: {message + Environment.NewLine}");

                if (manual)
                {
                    tb_chat_message.Clear();
                }
            }
        }
예제 #2
0
 private void send2_Click(object sender, RoutedEventArgs e)
 {
     byte[] byteData = Encoding.ASCII.GetBytes("This is a test 2<EOF>");
     AsyncClient.send(ref byteData);
 }