public NewPayLoad SendRequestPayLoad(NewPayLoad payload)
        {
            if (!mRecordingSocketTraffic)
            {
                return(SendToNode(payload));
            }
            else
            {
                GingerSocketLog gingerSocketLog = new GingerSocketLog();
                gingerSocketLog.SetPayLoad(payload);
                gingerSocketLog.LogType = "Send";
                Monitor.Add(gingerSocketLog);

                Stopwatch st = Stopwatch.StartNew();

                NewPayLoad responsePayload = SendToNode(payload);

                st.Stop();

                GingerSocketLog rc = new GingerSocketLog();
                rc.SetPayLoad(responsePayload);
                rc.LogType = "Recv";
                rc.Elapsed = st.ElapsedMilliseconds;
                Monitor.Add(rc);

                return(responsePayload);
            }
        }
Example #2
0
 public void Add(GingerSocketLog gingerSocketLog)
 {
     Dispatcher.Invoke(() => {
         GingerSocketLogs.Add(gingerSocketLog);
     });
 }
Example #3
0
        private void ResendButton_Click(object sender, RoutedEventArgs e)
        {
            GingerSocketLog GSL = (GingerSocketLog)MainListView.SelectedItem;

            mGingerNodeProxy.SendRequestPayLoad(GSL.PayLoad);
        }
Example #4
0
        private void MainListView_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            GingerSocketLog GSL = (GingerSocketLog)MainListView.SelectedItem;

            PacketInfoTextBlock.Text = GSL.Info;
        }