private void btnSend_Click(object sender, EventArgs e)
        {
            m_count = Convert.ToInt32(tbCount.Text);
            m_sendText = tbSendText.Text;
            if (m_client.IsConnectionAlive)
                m_client.Disconnect();
            ParallelClientOps ops=new ParallelClientOps(this,tbHostname.Text,tbPort.Text,ReceiveType.SEQUENTIAL,20);
            m_client.Connect(ops);

        }
Exemplo n.º 2
0
        /// <summary>
        /// Connect to server with given option
        /// </summary>
        /// <param name="ops">option for client</param>
        public void Connect(ParallelClientOps ops)
        {
            if (ops == null)
                ops = ParallelClientOps.defaultClientOps;
//             if (ops.CallBackObj == null)
//                 throw new NullReferenceException("callBackObj is null!");
            lock (m_generalLock)
            {
                m_clientOps = ops;
            }
            Start();
        }
Exemplo n.º 3
0
 /// <summary>
 /// Default copy constructor
 /// </summary>
 /// <param name="b">the object to copy from</param>
 public ParallelClient(ParallelClient b)
 {
     m_clientOps = b.m_clientOps;
 }