lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] LwIP app and multithreading


From: Jonathan D
Subject: [lwip-users] LwIP app and multithreading
Date: Thu, 17 Feb 2022 14:48:20 +0000

Hello,

I'm using LwIP 2.1.2 with FreeRTOS on a STM32F777.

I added Websocket support to my device, thanks to this patch : https://savannah.nongnu.org/patch/?9525
In my implementation, when the device receives a message through Websocket, it copies the content for another thread. The other thread interprets the message and then call `http_write`. It works, but `http_write` is not called from the `tcpip_thread` (and ASSERT fails).

Is it OK to just surround the `http_write` caller by `(UN)LOCK_TCPIP_CORE` ?
If not, is there a dedicated function called in the `tcpip_thread` where the device can check if there is something to send ?

I've read about Netconn API but as the connection was not initiated by netconn_new but with `httpd_init`, I don't think that Netconn API can be used in this case.

Thank you for your help,

Jonathan D.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]