Hi,

I am doing network programming in C. I want to send Hexadecimal data between client and server. But stuck how C handles Hexadecimal values? I would like to put and example.

I am having a variable ACK_CODE 0*81. Now want to send it. Since the send call can only receive String data then how we can send the above code in send()? Also how to retrieve that back into Hexadecimal from String in recv() call?

Can anyone help me in this regard?

Thanks

Shahab

Hi,

I am doing network programming in C. I want to send Hexadecimal data between client and server. But stuck how C handles Hexadecimal values? I would like to put and example.

I am having a variable ACK_CODE 0*81. Now want to send it. Since the send call can only receive String data then how we can send the above code in send()? Also how to retrieve that back into Hexadecimal from String in recv() call?

Can anyone help me in this regard?

Thanks

Shahab

The send function accepts a const void *buf in Linux so I expect it accepts something similar in Windows. Just cast the data to const void* and pass along the size

This question has already been answered. Start a new discussion instead.