anchor.diff:    Fin: File;
     DataArray: array of byte;
     FileSizeValue: Int64;
  +  SizeToSend: Int64;
  +  i: integer;
   begin
     //todo send track piece by piece, not all at same time
     Result := False;
  
positive.code: const
    HGD_PROTO_MAJOR: integer = 8;
    HGD_PROTO_MINOR: integer = 2;
  
    //The hgd protocol is telnet based, use CRLF as LineEnding
    ProtoLineEnding = CRLF;
  
negative.code:   begin
      Log('q successful, sending data...');
  
      SetLength(DataArray, BLOCK_SIZE);
      AssignFile(Fin, Filename);
  
      try
        FileMode := fmOpenRead;
        Reset(Fin, 1);
  
        for i := 0 to (FileSizeValue div BLOCK_SIZE) do
        begin
          if (FileSizeValue - i * BLOCK_SIZE) > BLOCK_SIZE then
            SizeToSend :=  BLOCK_SIZE
          else
            SizeToSend := FileSizeValue - i * BLOCK_SIZE;
  
          BlockRead(Fin, DataArray[0], SizeToSend);
          Socket.SendBuffer(@DataArray[0], SizeToSend);
  
         // if Assigned(ProgressCallBack) then
         //   ProgressCallBack();
  
        end;
  
      finally
        CloseFile(fin);
      end;
  
      SetLength(DataArray, 0);
  
  