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
Fork of NetworkSocketAPI by
Diff: TCPSocket.h
- Revision:
- 1:968f7b32278f
- Parent:
- 0:6a8b52ee83ed
- Child:
- 3:dea0cdb42241
--- a/TCPSocket.h	Tue Apr 05 05:40:43 2016 -0500
+++ b/TCPSocket.h	Tue Apr 05 05:47:57 2016 -0500
@@ -56,7 +56,19 @@
     \param size     The maximum length of the buffer
     \return         Number of received bytes on success, negative on failure
      */
-    int receive(void *data, unsigned size);
+    int recv(void *data, unsigned size);
+
+    /** Register a callback on when send is ready
+    \param callback Function to call when send will succeed, may be called in
+                    interrupt context.
+    */
+    void attach_send(FuncPtr<void()> callback);
+
+    /** Register a callback on when recv is ready
+    \param callback Function to call when recv will succeed, may be called in
+                    interrupt context.
+    */
+    void attach_recv(FuncPtr<void()> callback);
 };
 
 #endif
    