lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] calling tcp_write outside tcp_accept callback


From: Vojtech Janasek
Subject: Re: [lwip-users] calling tcp_write outside tcp_accept callback
Date: Fri, 17 Oct 2008 08:57:30 +0200
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)

Thank you for your information, is there some simple way how to do this? I tried to wait for new data in callback tcp_accept() - it isn't perfect but it seems to work.

address@hidden napsal(a):
Vojtech Janasek wrote:
Can I call tcp_write function outside callback functions tcp_accept()
and tcp_poll()? (keeping in mind it isn't reentrant)
As far as I can think, you can call tcp_write virtually from everywhere, not only from one of the callback. However, there is one limitation: in multithreading environments, all the raw API functions may only be called from the tcpip_thread since the raw API is not locked against concurrent access. From your description it seems you are doing exactly this, which would explain why the stack locks up at some point.

Simon


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users



--
www.janascard.cz
Vojtěch Janásek
Janascard
tel. 222315591, 732346758




reply via email to

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