how to convert BYTE array to char array for send with socket c++
15,290
BYTE b[40];
const char *p = reinterpret_cast<const char*>(b);
Author by
Vahagn
Updated on June 05, 2022Comments
-
Vahagn almost 2 years
I have some problem. I write client server app where information send & receive with win socket. On my project need send
BYTE
array to client, and on client this char array convert toBYTE
, how I can create it, please help me, becausesend()
function can send onlychar*
. Thank you.WSAAPI send( __in SOCKET s, __in_bcount(len) const char FAR * buf, __in int len, __in int flags );