On 25 May 2011 09:15,
<address@hidden> wrote:
Right, so I guess the best idea is to keep
the sockets local and per thread. In my final application I will have a
single thread communicating with the outside world over tcp/ip so this
won't be a problem. Out of curiosity, can sockets usually (in other implementations)
be shared between threads?
/Åke
-----------------------------
Åke Forslund
0433-273296
NIBE AB
Box 14
S-285 21 Markaryd
Tel +46-(0)433-273296
Kieran Mansley wrote:
> On Tue, 2011-05-24 at 15:14 +0200, address@hidden wrote:
>> 1. Can I use threads? One to receive and one to transmit data
and
>> then
>> check if the data arrives correctly?
> You can, but I would do it all in one thread, and use poll() to
> determine when each socket needs attention (either sending or
> receiving).
Actually, there's one limitation here I have to point out for completeness:
You may *not* share one sockets between multiple threads. So while you
are allowed to receive on socket A in one thread and send on socket B in
another thread, you may *not* receive on socket A in one thread an send
on the same socket A in any other thread!
Simon
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users