Board index » delphi » IdUDPClient1

IdUDPClient1


2005-05-06 04:26:00 AM
delphi109
SendBuffer is error, where a motive ?
dUdpClient1.sendbuffer(buffer,14);
I have Indy Version10, delphi 2005
Thank you
George
 
 

Re:IdUDPClient1

"George" <XXXX@XXXXX.COM>writes
Quote
SendBuffer is error, where a motive ?
SendBuffer() still exists in TIdUDPClient.
Quote
dUdpClient1.sendbuffer(buffer,14);
What is buffer declared as? In Indy 9, SendBuffer() accepted an untyped
parameter, which meant you could pass in raw memory. In Indy 10, that is no
longer the case. Due to .NET support, Indy no longer accept raw memory for
most operations. You must use the new TIdBytes type instead. If you have a
preexisting buffer that you want to send, you can use the RawToBytes()
function to convert it into a TIdBytes, ie:
var
IdBytes: TIdBytes;
begin
IdBytes := RawToBytes(buffer, 14);
IdUdpClient1.SendBuffer(IdBytes);
end;
Gambit