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: Thu, 14 May 2009 10:02:26 +0200

> Sounds pretty much like the same like a TCP-to-serial converter I wrote on 
> lwIP. I did it with the raw API though:
> - I have a tcp_recv-callback that waits until a complete packet is received
> - then that packet is parsed and sent to the right serial thread (together 
> with the PCB, for responses)
> - the serial thread sends the data and waits for a response
> - if a response is received, it is sent through RAW API by calling 
> tcpip_callback (with the correct PCB)

So, reading the tcp packet, parsing data, sending to the serial thread and also 
sending tcp reply and closing connection is done in tcp_thread (by callbacks)? 
This looks ok for me, because all pcb manipulations will be done in tcp_thread 
context. How can I use tcpip_callback function? Can you show me a short example?





reply via email to

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