Beispiel #1
0
        private static void WaitForInput(CSocket socket)
        {
            Tuple <String, Object> received = socket.ReceiveObject();
            String parameter = received.Item1;

            messageParameters = (MessageParameters)received.Item2;

            if (parameter.Equals(CALL_INDICATION))
            {
                CPCC.PrintLogs(CALL_INDICATION);
                CPCC.SendMessage(CALL_CONFIRMED_CPCC, messageParameters.getFirstParameter(), messageParameters.getSecondParameter(), messageParameters.getCapacity());
            }
            else if (parameter.Equals(CALL_TEARDOWN_CPCC))
            {
                CPCC.PrintLogs(CALL_TEARDOWN_CPCC);
                CPCC.SendMessage(CALL_TEARDOWN_CPCC, messageParameters.getFirstParameter(), messageParameters.getSecondParameter(), messageParameters.getCapacity());
            }
            else if (parameter.Equals(CALL_CONFIRMED_CPCC))
            {
                CPCC.PrintLogs(CALL_CONFIRMED_CPCC);
            }
            else if (parameter.Equals(CALL_REJECTED_CPCC))
            {
                CPCC.PrintLogs(CALL_REJECTED_CPCC);
            }
        }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     /*button1.Enabled = false;
      * Connect();
      * if (!backgroundWorker1.IsBusy)
      * {
      *  backgroundWorker1.RunWorkerAsync();
      * }
      */
     CPCC.PrintLogs(CPCC.CALL_REQUEST);
     CPCC.InitSendingThread(CPCC.CALL_REQUEST, Config.getProperty("client_name"), destinationTextBox.Text, Int32.Parse(textBox_capacity.Text));
 }
Beispiel #3
0
 private void deallocate_b_Click(object sender, EventArgs e)
 {
     CPCC.PrintLogs(CalledPartyCC.CALL_TEARDOWN_SEND);
     CPCC.InitSendingThread(CPCC.CALL_TEARDOWN, Config.getProperty("client_name"), destinationTextBox.Text, Int32.Parse(textBox_capacity.Text));
 }