c# Socket BeginReceive异步接收不到信息
while(kaishi){if(so.Available>0){print(123);try{ar=so.BeginReceive(result,0,1024,Sock...
while (kaishi)
{
if (so.Available > 0)
{
print(123);
try
{
ar = so.BeginReceive(result, 0, 1024, SocketFlags.None, new AsyncCallback(Socket_rec), this);
print(456);
}
catch (Exception e)
{
print(e.Message);
break;
}
}
打印了123和456,但是在回调函数里却没反应 展开
{
if (so.Available > 0)
{
print(123);
try
{
ar = so.BeginReceive(result, 0, 1024, SocketFlags.None, new AsyncCallback(Socket_rec), this);
print(456);
}
catch (Exception e)
{
print(e.Message);
break;
}
}
打印了123和456,但是在回调函数里却没反应 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询