lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] netconn - using in different tasks


From: ncoage
Subject: Re: [lwip-users] netconn - using in different tasks
Date: Wed, 13 May 2009 12:19:10 +0200

Thank you for your reply. I need more time to analize what you wrote :).
But now I have a question, you wrote:

> The most reliable way to implement what you describe would be for the
> callback connection to read all the data, reassemble and buffer it as
> necessary until it has assembled an entire application-level unit, then
> put the data (rather than the connection) on a queue and send them to
> the other task.  The other task would then not need to use lwIP at all,
> and all the lwIP access would be done from one task (in the callback).

I hope I understood you. The scenario is: I get new data from TCP, I put them 
to (exact) queue, another task reads data and send them to serial port. Now the 
task waits (blocks on semaphore) for reply from serial port and forms a reply 
to tcp. If I dont have a netconn in a the task, how can I send reply by TCP?

Callback function is called from tcp_thread, and I know that I cannot execute 
blocking functions there. Is it safe to call: netconn_recv and netbuf_data 
functions? (just to be sure).




reply via email to

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