hi to all. this is my first post in qtcentre, and basically my first question ever related to QT!
i'am trying to send audio data captured from mic to an ip camera (it has a build-in speaker).
the http api of my camera expects A POST HTTP request of the form:

POST /axis-cgi/audio/transmit.cgi HTTP/1.0\r\n
Content-Type: audio/basic\r\n
Content-Length: 9999999\r\n
Connection: Keep-Alive\r\n
Cache-Control: no-cache\r\n
\r\n
<Audio data>
<Audio data>
<Audio data>
...
<Audio data>


where <Audio data> are 240 bytes of audio data.


the problem iam facing is that at the time of the request the audio data are not avaliable. they become avaliable with time as you speak.

is there a way to handle this situation? how can i post the newly avaliable audio data when they will be avaliable; i guess that for every 240 new bytes of data i could write something like:
Qt Code:
  1. QNetworkRequest request(url);
  2. request.setRawHeader("httptype","singlepart");
  3. request.setRawHeader("Content-Type","audio/basic");
  4. request.setRawHeader("Connection","keep-alive");
  5.  
  6. //data is a QByteArray of 240 bytes
  7. //and manager is a QNetworkAccessManager object
  8. manager->post(request,&data);
To copy to clipboard, switch view to plain text mode 

but what i would like to do is to make the request once and then keep sending the new data when they would be avaliable.
Does anybody knows how to achieve this with QT;
any suggestions?