Example #1
0
 public ClientBussiness()
 {
     //客户端如何处理异常等信息参照服务端
     SocketHelper.pushSockets = new SocketHelper.PushSockets(Rec);//注册推送器
     client          = new SocketHelper.TcpClients();
     info.AimName    = ConfigurationManager.AppSettings["S_A_Name"];
     info.ClientName = ConfigurationManager.AppSettings["C_Name"];
     ip   = ConfigurationManager.AppSettings["ServicesIP"];
     port = ConfigurationManager.AppSettings["ServicesPort"];
 }
Example #2
0
        private void button13_Click(object sender, EventArgs e)
        {
            SocketHelper.pushSockets = new SocketHelper.PushSockets(Rec);//注册推送器
            client = new SocketHelper.TcpClients();
            string[] ips  = textBox3.Text.Split(':');
            string   ip   = ips[0];
            string   port = ips[1];

            client.InitSocket(ip, int.Parse(port));
            client.Start();
        }