Carsten Muencheberg schrieb:
> Fastream Technologies schrieb:
>> ----- Original Message ----- 
>> From: "Arno Garrels" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" <twsocket@elists.org>
>> Sent: Wednesday, May 17, 2006 5:03 PM
>> Subject: Re: [twsocket] thread message loop question
>>
>>
>> : Fastream Technologies wrote:
>> : >
>> : > I suggest you to add a simple Sleep(1) to the message pump
>> :
>> : This would result in very poor performance, it's really not
>> : recommended, even though it works ;-)
>> :
>> : For a simple message loop have a look at CtrlSocket.MessageLoop,
>> : it is the built-in message pump that you can call. Property
>> : CtrlSocket represents the underlying TWSocket instance,
>>
>> This is already called internally with Get() and it should be fixed with 
>> GetMessage.
>>
>> Regards,
>>
>> SZ
>>
> 
> That answers my original question, thank you.
> 
> Maybe I should explain further what I did. I started my download project
> by modifying "httptst1.cpp" demo.
> 
> If I now replace Get() with GetASync() in this demo, I find that the CPU
> load is the same! So my CPU load problem has nothing to do with ICS, but
>    with my download method via HTTP, right?
> 
> What other method or component could I use for downloading a file from a
> web server?
> 
> Regards,
> Carsten


Answering my own question:

void __fastcall TForm1::HttpCli1DocData(TObject *Sender, Pointer Buffer,
          int Len)
{
        Sleep(1);
}
//---------------------------------------------------------------------------

Did the trick, CPU is at 0% now. :-)

Thanks again for your help.
Carsten
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to