コード例 #1
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            if (txtIP1.Text == "" || txtIP2.Text == "")
            {
                return;
            }

            string serverIP1 = txtIP1.Text;
            string serverIP2 = txtIP2.Text;
            string clientIP  = "127.0.0.1";

            if (clientCalc1 == null)
            {
                clientCalc1 = new TClient(GetDataArrived1);
            }
            clientCalc1.ClientBeginConnect(serverIP1, 5000, clientIP);

            if (clientCalc2 == null)
            {
                clientCalc2 = new TClient(GetDataArrived2);
            }
            clientCalc2.ClientBeginConnect(serverIP2, 5001, clientIP);
        }