Embedded TCP/IP stack  4.7.0

◆ fnet_socket_set_callback_on_rx()

void fnet_socket_set_callback_on_rx ( void(*)(void)  callback)

Registers the "Socket Rx" event handler callback.

Parameters
callbackPointer to the event-handler callback function.
See also
FNET_CFG_SOCKET_CALLBACK_ON_RX

This function registers the handler callback function for the "Socket Rx" event.
This event occurs when the socket layer receives any packet for any existing socket. It can be a packet with or without data-payload including ACK, FIN and SYN.
For example, it can be used to wake-up a sleeping RTOS application waiting for a network activity. To stop the event handling, set callback parameter to zero value.
This function is available only if FNET_CFG_SOCKET_CALLBACK_ON_RX is set to 1.


© 2005-2020 by Andrej Butok. http://fnet.sourceforge.net