diff include/UdpServer.h @ 126:719119fb2905 scope-refactoring

Closing socket in the destructor
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 24 Aug 2015 15:25:34 +0100
parents 2197435e8fb4
children ff28e56e5b7e
line wrap: on
line diff
--- a/include/UdpServer.h	Sat Aug 22 02:53:36 2015 +0100
+++ b/include/UdpServer.h	Mon Aug 24 15:25:34 2015 +0100
@@ -12,6 +12,7 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <errno.h>
 #include <netdb.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -50,6 +51,7 @@
 			return as much data as is currently available without blocking.
 		 */
 		int read(void* destBuffer, int maxBytesToRead, bool blockUntilSpecifiedAmountHasArrived);
+		void close();
 		int emptySocket();
 		int emptySocket(int maxBytes);
 		void *getWaste();