For three hours I have been trying to find a solution; I need to send the number of unsigned long long from client to server using the smallest bytes
Do so
Customer:
unsigned long long n = 18446744073709551500; send(sock, (char *)n, 8, 0); Server:
char t[7]; recv(sock, t, 8, 0); unsigned long long n; memcpy(&n, t, sizeof(unsigned long long)); printf("%llu\n", n); Server output: 14757395258967641141
I have already tried a lot of things, maybe someone knows, I'm not strong at si, sorry for the stupid question