у вас есть метод с тем же именем
procedure TIdUDPClient.SendBuffer(const AHost: string; const APort: TIdPort;
const ABuffer: TIdBytes);
Вместо нетипизированного буфера он ожидает массив байтов. Каковы ваши данные? Вам просто нужно записать свои данные в виде массива байтов. Что-то вроде:
var
Buffer: TIdBytes;
begin
SetLength(Buffer, YourSizeOfData);
Move(YourData, Buffer[0], YourSizeOfData);
FIdUDPClient.SendBuffer('255.255.255.255', UIPerfPort, Buffer);
end;
Но, как я уже сказал, это зависит от типа данных. Подход, однако, в порядке.
EDIT:
Теперь, когда я вижу, что у вас есть запись, у вас есть два варианта:
Просто переместите всю запись в массив байтов.
Move(@aRecord, Buffer[0], (6 + TimeClassMax) * SizeOf(Integer));
В вашей записи есть метод CopyToBytes, который выполняет фактическое копирование. Я полагаю, более общий.
TTimeDataRecord = record
Size: Integer; //Size of record structure is transfered and compared for safty reasons.
ClientCount: Integer;
AccumulatedTime: Integer; //This is the accumulated time busy in microseconds
CurrentMessageTime: Integer; //This is the time the current message has been processed. If several computers report a high value at the same time it indicates a freeze!
TotalTimeFrame: Integer; //This is the total time measured in microseconds
MessageCount: Integer;
TimeClasses: array [0..TimeClassMax] of Integer;
procedure CopyToBytes(var Buffer: TIdBytes);
end
Реализация CopyToBytes
procedure TTimeDataRecord.CopyToBytes(var Buffer: TIdBytes);
begin
// copy the data however you see fit
end;