> Indeed the data transfered is continously transfered at high speed and it is 
> written directly to disk. 
> Which is the best method I could use to slow cpu usage?
> - make a timer and send data whith interrupts (but how to make a timer whith 
> 0.2 seconds step for example?)
> - find somehow a component that limits bandwidth so that data to be forced to 
> be send in slower motion ....
> - other method ....
> 

each time you receive data, you store it in a growing buffer (TMemoryStream for 
example).
When you have reached a certain size (may be configurable), you create a 
thread, you transmit the TMemoryStream to the thread,
and the thread is in charge of writing the data on disk.

You'll have to manage some shared access to the disk (if you write the data in 
one file).

HTH,

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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