NetworkSocketAPI

Dependencies:   DnsQuery

Dependents:   HelloWizFi250Interface

Fork of NetworkSocketAPI by NetworkSocketAPI

Revision:
79:43a7e8c0d6cc
Parent:
78:0914f9b9b24b
Child:
80:9c6673c93082
--- a/NetworkInterface.h	Tue Apr 05 09:20:32 2016 -0500
+++ b/NetworkInterface.h	Tue Apr 05 10:40:34 2016 -0500
@@ -17,6 +17,8 @@
 #ifndef NETWORK_INTERFACE_H
 #define NETWORK_INTERFACE_H
 
+#include "FunctionPointer.h"
+
 /**
  *  @enum ns_error_t
  *  @brief enum of standardized error codes
@@ -75,6 +77,11 @@
     virtual SocketAddress gethostbyname(const char *name, uint16_t port=0);
 
 protected:
+    friend class Socket;
+    friend class UDPSocket;
+    friend class TCPSocket;
+    friend class TCPServer;
+
     /** Enum of socket protocols
     /enum protocol_t
     */
@@ -194,21 +201,21 @@
     \param callback Function to call when accept will succeed, may be called in
                     interrupt context.
     */
-    virtual void socket_attach_accept(void *handle, FuncPtr<void()> callback) = 0;
+    virtual void socket_attach_accept(void *handle, mbed::FuncPtr<void()> callback) = 0;
 
     /** Register a callback on when send is ready
     \param handle   Socket handle
     \param callback Function to call when send will succeed, may be called in
                     interrupt context.
     */
-    virtual void socket_attach_send(void *handle, FuncPtr<void()> callback) = 0;
+    virtual void socket_attach_send(void *handle, mbed::FuncPtr<void()> callback) = 0;
 
     /** Register a callback on when recv is ready
     \param handle   Socket handle
     \param callback Function to call when recv will succeed, may be called in
                     interrupt context.
     */
-    virtual void socket_attach_recv(void *handle, FuncPtr<void()> callback) = 0;
+    virtual void socket_attach_recv(void *handle, mbed::FuncPtr<void()> callback) = 0;
 };
 
 #endif