Hello,
If I have a server application I get a socket via accept.
Is it now possible to use 2 thread which use this socket ?
One thread will read from the socket and the other one will write to this socket.
Thanks for your help
Reiner
LWIP - threadsafe
Re: LWIP - threadsafe
Hi Reinier,
Yes, this is supported and should work as expected.
It's even possible to close the socket while another task is blocking on read/write: https://docs.espressif.com/projects/esp ... fe-sockets
Angus
Yes, this is supported and should work as expected.
It's even possible to close the socket while another task is blocking on read/write: https://docs.espressif.com/projects/esp ... fe-sockets
Angus
-
- Posts: 39
- Joined: Tue Mar 20, 2018 6:28 pm
Re: LWIP - threadsafe
Thanks for the answer.
What should be used:
The lwip function or the "normal" function ?
e.g lwip_accept or only accept ?
What should be used:
The lwip function or the "normal" function ?
e.g lwip_accept or only accept ?
Re: LWIP - threadsafe
You can use either but we recommend calling the standard functions - ie accept(). But they compile to the same thing.
Who is online
Users browsing this forum: Baidu [Spider] and 125 guests