// Try sending the message to the client. private async void SendButton_Click(object sender, RoutedEventArgs e) { if (MessageBox.Text != "" && commModule != null) { string message = MessageBox.Text; await Task.Factory.StartNew(() => { commModule.SendMessage(message); }); } }