NetworkSocketAPI
Dependents: HelloWizFi250Interface
Fork of NetworkSocketAPI by
Diff: NetworkInterface.h
- Revision:
- 92:dd5f19874adf
- Parent:
- 91:cad29ce6a01c
- Child:
- 93:65a9f84862f0
diff -r cad29ce6a01c -r dd5f19874adf NetworkInterface.h --- a/NetworkInterface.h Tue Apr 19 18:23:12 2016 -0500 +++ b/NetworkInterface.h Tue Apr 19 18:23:29 2016 -0500 @@ -204,29 +204,13 @@ */ virtual int socket_close(void *handle) = 0; - /** Register a callback on when a new connection is ready - * @param handle Socket handle - * @param callback Function to call when accept will succeed, may be called in - * interrupt context. - * @param id Argument to pass to callback - */ - virtual void socket_attach_accept(void *handle, void (*callback)(void *), void *id) = 0; - - /** Register a callback on when send is ready + /** Register a callback on state change of the socket * @param handle Socket handle - * @param callback Function to call when accept will succeed, may be called in - * interrupt context. - * @param id Argument to pass to callback + * @param callback Function to call on state change + * @param data Argument to pass to callback + * @note Callback may be called in an interrupt context. */ - virtual void socket_attach_send(void *handle, void (*callback)(void *), void *id) = 0; - - /** Register a callback on when recv is ready - * @param handle Socket handle - * @param callback Function to call when accept will succeed, may be called in - * interrupt context. - * @param id Argument to pass to callback - */ - virtual void socket_attach_recv(void *handle, void (*callback)(void *), void *id) = 0; + virtual void socket_attach(void *handle, void (*callback)(void *), void *data) = 0; }; #endif