用PPC 模拟器 socket 连接 速度慢。
TcpClient Client = new TcpClient();
string ip = gncls.getXmlSettingValue(gncls.apppath() + @"\Config.xml", "program", "ip", ""); ;
int port = Convert.ToInt32(gncls.getXmlSettingValue(gncls.apppath() + @"\Config.xml", "program", "port", ""));
try
{
Client.Connect(ip, port);
MessageBox.Show("连接成功:" , "税务新时空");
}
catch (Exception ex)
{
MessageBox.Show("连接失败:" + ex.Message, "税务新时空");
return false;
}
用ppc 模拟器 通过虚拟网卡 连接到服务器 用以上代码 进行socket 连接 速度慢 要10秒左右才能通