While using this program, my problem is that the converted hexadecimal when sent over to the server is being converted to ASCII again.

For example, If I sent "Hello" from the client, the server would get "48 65 6C 6C 6F" as string , but the actual datatransfer considers the hex value as ASCII. So over the ethernet, "48 65 6C 6C 6F" is changed to its hex value, 34 38 20 36 35.
What I am actually hoping to achieve is to connect to a device on my ethernet which received ONLY hexadecimal values. My original program contains many hex values which have to be sent to the device. But when I am sending these hexvalues, they are considered as ASCII. This is a big problem as the device cannot understand ASCII/String.

As a result the converted hex value is considered as string/ascii and it is converted again to hex and being sent on the actual network.

For example, if I convert the IP address 192.168.18.7 to its hexadecimal values, I hope to sent it to the device as hexadecimal values itself and not consider the hexadecimal of the IP add as ASCII.

It would be great if someone could help me regarding this please. Any help would me much appreciated. Thanks very much.