Накидал вот такой алгоритм создания непрерывного потока.
Имеет ли он право на жизнь?
C++ (Qt)
QTcpSocket *tcpSocket=new QTcpSocket;
/* here connect to server */
QBuffer *buffer=new QBuffer;
buffer->open(QIODevice::Append); /// my buffer for write and send to client/server
QByteArray block; /// my tmp data for write (append) to buffer
QDataStream bout(&block,QIODevice::ReadWrite);
/// operation witch block (add new data)
/*
ADD NEW DATA TO BLOCK HERE
*/
buffer->write(block); /// append (write) my data to buffer
//buffer->
/// now i send buffer to client/server on second thread
tcpSocket->write(buffer->buffer());
/// reset buffer
qint64 maxBufferSize=10000; //set maximum buffer size
if(buffer->size()==maxBufferSize){
buffer->seek(0); /// go to start point
}//if