Nog een poging...
This commit is contained in:
parent
b3214427a1
commit
ed8008f956
1 changed files with 8 additions and 2 deletions
|
@ -38,12 +38,18 @@ int DDV_Accept(int sock){
|
||||||
|
|
||||||
bool DDV_write(void * buffer, int width, int count, int sock){
|
bool DDV_write(void * buffer, int width, int count, int sock){
|
||||||
bool r = (send(sock, buffer, width*count, 0) == width*count);
|
bool r = (send(sock, buffer, width*count, 0) == width*count);
|
||||||
if (!r){socketError = true;}
|
if (!r){
|
||||||
|
socketError = true;
|
||||||
|
printf("Could not write! %s\n", strerror(errno));
|
||||||
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DDV_read(void * buffer, int width, int count, int sock){
|
bool DDV_read(void * buffer, int width, int count, int sock){
|
||||||
bool r = (recv(sock, buffer, width*count, 0) == width*count);
|
bool r = (recv(sock, buffer, width*count, 0) == width*count);
|
||||||
if (!r){socketError = true;}
|
if (!r){
|
||||||
|
socketError = true;
|
||||||
|
printf("Could not read! %s\n", strerror(errno));
|
||||||
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue