Yes, i got the idea that if have no OS i would have to create some sort of polling with state machine and callbacks to make use of the raw API. But assuming I AM using a RTOS with the standard API, how would i bind some external webserver or whatever to the the lwIP TCP/IP stack? Assuming that this webserver was developed using standard BSD sockets functions.
On Mon, Oct 18, 2010 at 6:35 PM, Kieran Mansley
<address@hidden> wrote:
On Mon, 2010-10-18 at 18:30 +0200, Luis Rossi wrote:
> And how standard is the lwip compared to BSD sockets, i just looked at
> the
> file and functions and as example the accept function does not look
> alike
> the BSD accept funtion. Or am i missing something?
To use accept as an example: In sockets you would do something like call
accept() to wait for an accepted socket. It would block until a
connection arrived. In the lwIP raw API there is no way to wait for an
accepted socket. You just set the callback function to be called when a
new socket arrives using the tcp_accept() function. You application
therefore needs a very different structure as it is event driven rather
than synchronous.
Have a read of lwip/doc/rawapi.txt for more detail and example.