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: TCPServer.h
- Revision:
- 73:968f7b32278f
- Parent:
- 72:6a8b52ee83ed
- Child:
- 75:dea0cdb42241
--- a/TCPServer.h Tue Apr 05 05:40:43 2016 -0500
+++ b/TCPServer.h Tue Apr 05 05:47:57 2016 -0500
@@ -48,6 +48,12 @@
\return 0 on success, negative on failure.
*/
int accept(TCPSocket &connection);
+
+ /** Register a callback on when a new connection is ready
+ \param callback Function to call when accept will succeed, may be called in
+ interrupt context.
+ */
+ void attach_accept(FuncPtr<void()> callback);
};
#endif
