title: AsyncSocket delegate method called incorrectly?
body: <p>I'm transferring a reasonably large image over a local network from an iPhone to Mac using the AsyncSocket class. In the header the didReadData delegate method is declared as below:</p>
  
  <pre><code>/**
   * Called when a socket has completed reading the requested data into memory.
   * Not called if there is an error.
  **/
  - (void)onSocket:(AsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag;
  </code></pre>
  
  <p>It says this method will be called when the socket has <strong>completed</strong> reading the data. However this method is called many times, each time data length increasing. How am I meant to know when the download is finished? Am I meant to send the length of the data in the first few bytes?</p>