I am having trouble sending an ints array through a socket. The code is as follows:
Program 1 (works in windows)
int bmp_info_buff[3]; send(my_socket, (char*)bmp_info_buff, 3, 0);
Program 2 (runs on neutrinos)
int bmp_info_buff[3]; recv(my_connection, bmp_info_buff, 3, NULL); printf("Size of bitmap: %d\nwidth: %d\nheight: %d\n", bmp_info_buff[0], bmp_info_buff[1], bmp_info_buff[2]);
It needs to print. Bitmap size: 64
width: 8
height: 8
Bitmap Size: 64
width: 6
height: 4096
What am I doing wrong?
source share