Example #1
0
        /// <summary>
        /// 建立连接,并产生接受类.
        /// </summary>
        public void Star()
        {
            back = new CallBack();
            InstanceContext context = new InstanceContext(back);

            client = new ServiceClient(context);
            //client.Login(personInfo);
        }
Example #2
0
        /// <summary>
        /// 改变连接Ip
        /// </summary>
        /// <param name="IP"></param>
        public void Change_connection_IP(string IP)
        {
            back = new CallBack();
            InstanceContext context = new InstanceContext(back);

            client = new ServiceClient(context);
            client.Endpoint.Address = new EndpointAddress("net.tcp://" + IP + "/6000/mywcf");
        }