On Fri, 11 Sep 2020 16:58:50 -0400, James Richters via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:
>I'm trying to figure out how to send and receive Arrays of Bytes or perhaps a >buffer of hex codes over TCP/IP, but everything I find seems to want to send >and receive strings. Can someone please point me in the right direction on >how to do this? > >Basically I want to make a connection to an IP address at a specific port and >then send some bytes to the server then get some bytes back from the server. >The data sent is just hexadecimal and it can't be followed by linefeeds or >carriage returns, and I want to just receive the bytes back into a buffer of >some sort so I can look at it one byte at a time. I prefer some kind of array >of bytes so I can just access the bytes with elements of the array. > >I've been going round and round trying to figure this out. Any help is >greatly appreciated > If you use Indy10 you will find that TIdTcpClient has methods to read and send the data as TBytes, i.e. array of bytes. -- Bo Berglund Developer in Sweden _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal