In the socket mode, the application thread must launch a separate thread to receive the input
packets. This performs the same work as the RAW mode function,
xemacif_input()
, except that it resides in its own separate thread;
consequently, any lwIP socket mode application is required to have code similar to the
following in its main thread:
Note: For Socket mode only.
sys_thread_new(“xemacif_input_thread”,
xemacif_input_thread, netif, THREAD_STACK_SIZE, DEFAULT_THREAD_PRIO);
The application can then continue launching separate threads for doing application specific tasks. The xemacif_input_thread() receives data processed by the interrupt handlers, and passes them to the lwIP tcpip_thread.
Prototype
void xemacif_input_thread(struct netif *netif)