[Qt-interest] Socket communication without threads

R. Reucher rene.reucher at batcom-it.net
Mon Mar 2 20:15:46 CET 2009


On Mon March 2 2009 19:51:20 Predrag Manojlovic wrote:
> > Just don't choose a block size of "several giga bytes" when sending data
> > to the clients -- this would make the other clients wait. If you really
> > need to send so much data, send it in smaller blocks... that's all there
> > is to it.
>
> Thank you for your answer.
>
> That is not too practical.
> In that case i cannot send large file at once. I must send block,
> maintain list of file objects for every client requested, etc...
> That complicates code more then adding thread.
Trust me, that's BEST practice!

Anyway, you should also take a look at QTcpServer which will take all the 
hassle from you:
http://doc.trolltech.com/4.4/qtcpserver.html
-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/

"Every time I think I know where it's at, they move it."




More information about the Qt-interest-old mailing list