lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Sockets - read() - without copying buffers


From: ncoage
Subject: Re: [lwip-users] Sockets - read() - without copying buffers
Date: Mon, 11 May 2009 12:57:01 +0200

> No, the sockets API doesn't work like that.  Are you sure you can safely
> use the internal buffer of the socket?  It doesn't sound safe to me.
> 
> Kieran

I'm not sure if it is safe, but I'm sure that this will be a kind of hack. My 
application code needs sockets API because I must handle many connections at 
the same time (select), so raw and netconn APIs don't fit. Using sockets and 
function read() I waste too much memory for buffers. The buffers are defined as 
a static arrays. Considering worst case they are big enough to hold all 
incoming data. In application I instantiate three servers running on different 
ports.

ps. I think the Netconn API should have a function like select to handle many 
connections without need to create separate tasks. 

Gregory




reply via email to

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