比如pop.yeah.net这是现在的代码。
TcpClient tcpClient = new TcpClient(this.HostName,this.Port);
NetworkStream ns = tcpClient.GetStream();
StreamReader rs = new StreamReader(ns); rs.ReadLine(); string data;
if (context == null)
{
data = command + "\r\n";
}
else
{
data = command + " " + context + "\r\n";
} byte[] bytesData = Encoding.ASCII.GetBytes(data); try
{
ns.Write(bytesData, 0, bytesData.Length);
Debug.WriteLine(rs.ReadLine());
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
TcpClient tcpClient = new TcpClient(this.HostName,this.Port);
NetworkStream ns = tcpClient.GetStream();
StreamReader rs = new StreamReader(ns); rs.ReadLine(); string data;
if (context == null)
{
data = command + "\r\n";
}
else
{
data = command + " " + context + "\r\n";
} byte[] bytesData = Encoding.ASCII.GetBytes(data); try
{
ns.Write(bytesData, 0, bytesData.Length);
Debug.WriteLine(rs.ReadLine());
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货