mobile和wince的tcp通信处理有区别吗?
下面的代码在wince上运行能够正常的向PC服务端发送数据,在Mobile上运行时,虽然socket能够连接到服务器,但是发送的数据服务器接收不到。请诸位高手帮忙看看什么地方出了问题。
private static void send(SocketFlags f)
{
try
{
using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
{
IPAddress ip = IPAddress.Parse("192.168.0.200");
IPEndPoint iep = new IPEndPoint(ip, 20000);
socket.Blocking = true;
//socket.SocketType = SocketType.Stream;
socket.Connect(iep);
int c = 0;
if (socket.Connected)
{
byte[] b;
string str;
str = f.ToString();
b = Encoding.Default.GetBytes(str);
c=socket.Send(b).ToString();
socket.Close();
}
}
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
}
...全文
相关推荐
WINCETCP通信代码
C#,WINCE服务器的TCP通信程序源代码,包括客户端与服务端,运用的TcpClient类编写
wince6.0实现ICMP协议执行ping命令
本人亲测wince6.0系统下功能正常。C# ping命令的实现方法,首先利用原始Socket套接字,实现ICMP协议,然后执行ping命令。
wince UDP 客户端案例 C#版
wince UDP 客户端案例 C#版
windowsmobile系统gprs联网开发
WindowsMobile系统gprs上网开发,链接GPRS网络
高新兴物联ME3630 PCIE 产品规格书_V1.8.pdf
高新兴物联ME3630 PCIE 产品规格书_V1.8.pdf


