i have the following code :
int * buffer;
buffer = (int *) malloc((320*240)*sizeof(int));
after populating the buffer
with data i want to send it using UDP sockets, however it seems that currently my following send
function sends just 4 byte (of data) and not ((320*240)*sizeof(int)):
iError = send(MySock, (char *)(buffer) , sizeof(buffer), 0);
i am tried different combinations on the second and third fields of the send
function but it doesn't work, What is the correct syntax should i use?
BTW i have to define the buffer
as int *
since it being used by other library that has to get that as int *
.