예제 #1
0
        private void ConnectionHandler(StateSaverClass stateSaver)
        {
            RequestBuilderClass reqBuilder = new RequestBuilderClass();

            byte[] msg;
            try
            {
                while (stateSaver.sentCounter < Convert.ToInt32(stateSaver.numMessages))
                {
                    msg = reqBuilder.BuildRequest(stateSaver);
                    stateSaver.sock.Send(msg);

                    stateSaver.lb.sentMessages.Add(msg);

                    Thread.Sleep(Convert.ToInt32(stateSaver.pace));
                    stateSaver.sentCounter++;
                }

                //System.Windows.Forms.MessageBox.Show("Finished Sending");
            }
            catch (Exception e)
            {
                e.Message.ToString();
            }
        }
예제 #2
0
        private void ConnectionHandler(StateSaverClass stateSaver)
        {
            RequestBuilderClass reqBuilder = new RequestBuilderClass();
            byte[] msg;
            try
            {
                while (stateSaver.sentCounter < Convert.ToInt32(stateSaver.numMessages))
                {
                    msg = reqBuilder.BuildRequest(stateSaver);
                    stateSaver.sock.Send(msg);

                    stateSaver.lb.sentMessages.Add(msg);

                    Thread.Sleep(Convert.ToInt32(stateSaver.pace));
                    stateSaver.sentCounter++;
                }

                //System.Windows.Forms.MessageBox.Show("Finished Sending");
            }
            catch (Exception e)
            {
                e.Message.ToString();
            }
        }