Re:UDP
Hi Gabriel,
Let's follow the rules and use English when we post to the ng. If you want
to send me a message in Portuguese, please use my privete e-mail adress.
You are welcome.
Quote
>Ola Humberto...Obrigado pela resposta...bom...a melhor op??o para buscar
>dados em string da rede, na sua opniao, seria o receivebuffer, ou o
>receivestring diretamente?
You ask me if the best option would be using the ReceiveString or the
ReceiveBuffer functions to retreive string data from the network. IMO, if
you know beforehand that the value is a string, using ReceiveString is the
simplest option.
Humberto Jemma (Brazil)
Quote
>> Hi,
>> >Hi...Im using a udp server to get data...I open the port and stay
>listening
>> >with teh ReceiveString(const AmSec) but I receive the data with a lot of
>> >characters..I changed to ReceiveBuffer(var ABuffer; const AByteCount:
>> >Integer; ATimeOut: integer): integer passing a PChar, but when I try to
>> >change pChar to String a receive a memory exception...
>> This is probably because the ReceiveBuffer function is returning in
>ABuffer
>> an array of char without the null terminator. Force a null terminator at
>> memory position (ABuffer + AByteCount + 1) before changing ABuffer to a
>> Pascal string.
>> Humberto Jemma (Brazil)
>> -------------------------------
>> Message Posted by <dedGateway>
>> http://www.dedonline.com/forumb
-------------------------------
Message Posted by <dedGateway>
http://www.dedonline.com/forumb