[fpc-pascal] Sending Hex codes over TCP/IP

James Richters james at productionautomation.net
Fri Sep 11 22:58:50 CEST 2020


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


James



More information about the fpc-pascal mailing list