[Qt-interest] Socket communication without threads

Roland Krause rokrau at yahoo.com
Tue Mar 3 21:09:42 CET 2009


> You really expect the network driver or glibc or Qt to have buffers in memory 
> of several hundred megabytes???

Certainly not the network driver, not sure what glibc has to do with it or whether but from the documentation of Qt where it says that there is by default unlimited buffering, yes, that's exactly what I had expected. I guess I was mislead by high-level communication protocols such as MPI. 

> Still no need for threads. Just create your own buffer which you append data to 
inside the slot connected to readyRead(). Once a full dataset is in the buffer 
you can trigger processing (while the next dataset might be appended by 
readyRead()). 

That's actually what I would expect the Qt function to do :-) As I said, I wanna try this with a QTcpSocket next before i consider it a bigger problem :-) 

> Why would you want several (explicit) threads when you already 
have several apps (the same as threads only they each have their own memory 
section)?

:-) That's a bit of a difference - and I do currently not use threads here. 

Roland


      



More information about the Qt-interest-old mailing list