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