Socket hostSocket = receiveSocket.Accept();
///设置接收数据缓冲区的大小
Byte[] recData = new Byte[1000];
int bytes = 0;
while (true)
{
bytes = hostSocket.Receive(recData, recData.Length, 0);
//读取完成后退出循环
i += bytes;
if (bytes <= 0)
break;
//将读取的字节数转换为字符串
}要多次接收 怎么连续的存入缓冲区recData?最后只解释全部
///设置接收数据缓冲区的大小
Byte[] recData = new Byte[1000];
int bytes = 0;
while (true)
{
bytes = hostSocket.Receive(recData, recData.Length, 0);
//读取完成后退出循环
i += bytes;
if (bytes <= 0)
break;
//将读取的字节数转换为字符串
}要多次接收 怎么连续的存入缓冲区recData?最后只解释全部
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货