Closed
Description
Description
- Type: Enhancement
In the socket callback function:
/** Register a callback on state change of the socket
*
* The specified callback will be called on state changes such as when
* the socket can recv/send/accept successfully and on when an error
* occurs. The callback may also be called spuriously without reason.
*
* The callback may be called in an interrupt context and should not
* perform expensive operations such as recv/send calls.
*
* @param func Function to call on state change
*/
void attach(mbed::Callback<void()> func);
https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/Socket.h#L157-L168
it would be useful if either the callback passed the state change as a parameter or a separate function was available to read the state change that generated the callback in the first place.
This would allow the application to infer what commands the network stack is ready for next.