Roy van Dam / NetworkAPI

Dependents:   NetRelais TCP_Client_Example TCP_Server_Example UDP_Server_Example ... more

Revision:
6:847a0b218e22
Parent:
3:d30db8752485
diff -r 4b6bc10437cb -r 847a0b218e22 udp/socket.hpp
--- a/udp/socket.hpp	Wed Jul 18 14:35:02 2012 +0000
+++ b/udp/socket.hpp	Wed Jul 18 15:31:16 2012 +0000
@@ -26,6 +26,7 @@
 #ifndef _NETWORK_UDP_SOCKET_HPP_
 #define _NETWORK_UDP_SOCKET_HPP_
 
+#include "../buffer.hpp"
 #include "../socket.hpp"
 #include "../ip/address.hpp"
 
@@ -38,9 +39,12 @@
         public:        
             int open();
         
+            int send(Buffer &buffer, ip::Address &address, int port);
+            int send(Buffer &buffer, ip::Endpoint &endpoint);
             int send(void *data, size_t size, ip::Address &address, int port);
             int send(void *data, size_t size, ip::Endpoint &endpoint);
             
+            int receive(Buffer &buffer);
             int receive(void *data, size_t max_size);
             int receive(void *data, size_t max_size, ip::Endpoint &endpoint);
     };