From 2ad46257e73629b8d8726b63aafab362647c38df Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 8 Nov 2010 00:56:49 +0100 Subject: [PATCH] Nog een poging... --- util/ddv_socket.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/util/ddv_socket.cpp b/util/ddv_socket.cpp index beb23d41..bc6fe670 100644 --- a/util/ddv_socket.cpp +++ b/util/ddv_socket.cpp @@ -34,3 +34,11 @@ int DDV_Listen(int port){ int DDV_Accept(int sock){ return accept(sock, 0, 0); } + +bool DDV_write(char * buffer, int width, int count, int sock){ + return (send(sock, buffer, width*count, 0) == width*count); +} + +bool DDV_read(char * buffer, int width, int count, int sock){ + return (recv(sock, buffer, width*count, 0) == width*count); +}