H
helium-he
Unregistered / Unconfirmed
GUEST, unregistred user!
程序如下:
m:=0;
Count:=0;
while m <= 0do
begin
sleep(2);
m:=ClientSocket2.Socket.ReceiveBuf(Buff,1000);
inc(count);
if Count > 2800 then
break;
end;
============================
ClientSocket2没有接收数据,程序中从开始循环到结束退出用了28秒多
如果把Sleep(2)去掉,程序如下:
m:=0;
Count:=0;
while m <= 0do
begin
//sleep(2);
m:=ClientSocket2.Socket.ReceiveBuf(Buff,1000);
inc(count);
if Count > 2800 then
break;
end;
==========================
那么从开始循环到结束,用了不到几毫秒
这两者怎么相差这么大?
m:=0;
Count:=0;
while m <= 0do
begin
sleep(2);
m:=ClientSocket2.Socket.ReceiveBuf(Buff,1000);
inc(count);
if Count > 2800 then
break;
end;
============================
ClientSocket2没有接收数据,程序中从开始循环到结束退出用了28秒多
如果把Sleep(2)去掉,程序如下:
m:=0;
Count:=0;
while m <= 0do
begin
//sleep(2);
m:=ClientSocket2.Socket.ReceiveBuf(Buff,1000);
inc(count);
if Count > 2800 then
break;
end;
==========================
那么从开始循环到结束,用了不到几毫秒
这两者怎么相差这么大?