| View previous topic :: View next topic |
| Author |
Message |
zxp Guest
|
Posted: Wed Sep 27, 2006 7:05 am Post subject: How To Get The TIdPeerThread.Connection.FWriteBuffer? |
|
|
Deal All:
TCP Server use a timer Call threads.LocakList to get all Threads. and
Send Data to All threads. But if some Client not to recv data, will hold the
server apllication when call TidpeerThread.connection.writebuffer procedure.
how to resolve this problem? To ClearWriteBuffer?Flushwirtebuffer?
Thanks!
zxp. |
|
| Back to top |
|
 |
York Guest
|
Posted: Wed Sep 27, 2006 7:14 am Post subject: Re: How To Get The TIdPeerThread.Connection.FWriteBuffer? |
|
|
This is blocking. This approach also is not quite convenient because the
last in the list will always be the last to get its data though it can be
the fastest connection. For "time-critical" operations this is not good.
I'd suggest using a "writer thread" for each connection on the server and a
queue for each thread or one single queue for all of them - it depends on
your data and what you want to accomplish.
Regards
"zxp" <zxp (AT) hundure (DOT) net> wrote in message
news:4519dc74 (AT) newsgroups (DOT) borland.com...
| Quote: | Deal All:
TCP Server use a timer Call threads.LocakList to get all Threads. and
Send Data to All threads. But if some Client not to recv data, will hold
the server apllication when call TidpeerThread.connection.writebuffer
procedure. how to resolve this problem? To
ClearWriteBuffer?Flushwirtebuffer?
Thanks!
zxp.
|
|
|
| Back to top |
|
 |
|