In SDK-3.3.1, the http server uses different threads to handle receive and
wiced_http_server_connect_callback sends asynchronous event to HTTPserver
thread when got CONNECT packet.
It sends asynchronous event to HTTPserver thread when got DISCONNECT packet.
It sends asynchronous event to deferred worker thread when got RECEIVE packet.
Since the HTTPserver is running in WICED_DEFAULT_LIBRARY_PRIORITY which has
higher priority than the defered worker thread (WICED_APPLICATION_PRIORITY),
How do you ensure the http_server_deferred_receive_callback is called before
the DISCONNECT is handled? If DISCONNECT is handled by HTTPserver first, the
receive packet is lost.
I'd appreciate if someone can explain the changes in http server implementation.
Given the nature of asynchronous event, there is no guarantee that the
RECEIVE will be handled before DISCONNECT when RECEIVE and DISCONNECT
are handled in different threads.
I think this needs fix, any comment for this question?