Indy 9
Example
TIdTCPConnection.ReadStream
      if bSizeKnown then
      // read known data size
      AConnection.ReadStream(AStream, ABytes, False)
      else
      // read all data until disconnected
      AConnection.ReadStream(AStream, -1, True);

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.