Exemple #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     using (localhost.MessagingServiceClient proxy = new WinClient.localhost.MessagingServiceClient())
     {
         proxy.SendMessage(string.Format("Message {0} from client", m_counter++));
     }
 }
Exemple #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     using (localhost.MessagingServiceClient proxy = new WinClient.localhost.MessagingServiceClient())
     {
         proxy.SendMessage("Message from client");
     }
 }
Exemple #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     using (localhost.MessagingServiceClient proxy = new WinClient.localhost.MessagingServiceClient())
     {
         proxy.ClientCredentials.UserName.UserName = "******";
         proxy.ClientCredentials.UserName.Password = "******";
         proxy.SendMessage("Message from client");
     }
 }
Exemple #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     using (localhost.MessagingServiceClient proxy = new WinClient.localhost.MessagingServiceClient())
     {
         // TODO: insert valid windows credentials here
         proxy.ClientCredentials.UserName.UserName = "******";
         proxy.ClientCredentials.UserName.Password = "******";
         proxy.SendMessage("Message from client");
     }
 }
Exemple #5
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         using (localhost.MessagingServiceClient proxy = new WinClient.localhost.MessagingServiceClient())
         {
             proxy.SendMessage("Message 1");
             MessageBox.Show("About to send second message. To test timeout wait here for 10 seconds....");
             proxy.SendMessage("Message 2");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Exemple #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                using (localhost.MessagingServiceClient proxy = new WinClient.localhost.MessagingServiceClient())
                {
                    MessageBox.Show(string.Format("About to send message {0}.", m_counter));
                    proxy.SendMessage(string.Format("Message {0}", m_counter++));
                    MessageBox.Show(string.Format("About to send message {0}.", m_counter));

                    proxy.SendMessage(string.Format("Message {0}", m_counter++));

                    MessageBox.Show("About to close the proxy.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Exemple #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                using (localhost.MessagingServiceClient proxy = new WinClient.localhost.MessagingServiceClient())
                {
                    MessageBox.Show("About to establish an RM session on first call. Make sure you have started TcpTrace to listen on port 8080 and send to destination port 8000 before you close this dialog.");
                    proxy.SendMessage("Message 1");

                    MessageBox.Show("About to send second message. To test RM retries, go to TcpTrace and stop the trace session, then restart it right away. To test retry failure, do not restart the trace session.");
                    proxy.SendMessage("Message 2");

                    MessageBox.Show("About to send third message.");
                    proxy.SendMessage("Message 3");

                    MessageBox.Show("About to close the proxy.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }