lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] a beginners questions about lwip, sockets and threads


From: address@hidden
Subject: Re: [lwip-users] a beginners questions about lwip, sockets and threads
Date: Tue, 24 May 2011 19:08:57 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

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



reply via email to

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