is there any way to send commands from server to client with c++? i use send() function, but i have to convert numbers(like 0x100) to strings then convert strings to numbers in the client side... Basically the function that send directly numbers to client...
server:
ZeroMemory(msg,sizeof(msg));
wsprintf( msg , "142");
send(connect_sock ,(char*) msg , sizeof(msg) , 0);
client:
ZeroMemory(msg,sizeof(msg));
recv (connect_sock, msg, sizeof(msg)-1, 0);
int i = atoi(msg);
if ( i == 142 )
...