Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DnsQuery
Dependents: WizFi310_TCP_Echo_Server_Example
Fork of NetworkSocketAPI by
Diff: NetworkInterface.h
- Revision:
- 79:43a7e8c0d6cc
- Parent:
- 78:0914f9b9b24b
- Child:
- 80:9c6673c93082
diff -r 0914f9b9b24b -r 43a7e8c0d6cc NetworkInterface.h
--- 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
    