|Subject:||Re: Reading and writing at the same time.|
|Posted by:||Remy Lebeau (TeamB) (gambit…@yahoo.com)|
|Date:||Fri, 27 Jun 2003|
"Adem Meral" <ademmer…@makrosis.com.tr> wrote in message
> a. ) Is it safe to write to a read looping thread ?
You can read from and write to a socket from multiple threads, yes.
> b. ) Is it possible to bufferwrite the outgoing data to
> avoid network delays to avoid say modem clients to
> slowdown lan or cable/dsl clients.
Even if there were such a buffering system, it would still block when
writing to individual connections. All operations in Indy are blocking in
general. If you want to send a packet to multiple clients at the same time,
then spawn off multiple worker threads, one for each client, that handle the
sending to each client in parallel.
Reading and writing at the same time. posted by Adem Meral on Fri, 27 Jun 2003