lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Multiple connections at the same time (netconns)


From: Simon Goldschmidt
Subject: Re: [lwip-users] Multiple connections at the same time (netconns)
Date: Thu, 19 Feb 2009 09:18:09 +0100

> I'm using lwip with FreeRTOS. How can I write a server that accept
> connections, but dont disconnect them after transfering data. In other words I
> must to have a multiple opened connections waiting for incoming data. Is that
> true, that I must to create task for particular connection?

With standard sockets, you could use select to block until *any* connection has 
data to receive (or until more data can be sent) so you can use a single thread.

Since the netconn API does not provide select, you could implement this on your 
own (pass a pointer to your callback function to 
netconn_new_with_proto_and_callback and implement what select does), but that 
could be a hard thing to do...

Of course you could always use the socket API.

Simon
-- 
Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL 
für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a




reply via email to

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