lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Include possibility to increase the socket offset


From: dipswitch
Subject: Re: [lwip-devel] Include possibility to increase the socket offset
Date: Wed, 11 Jan 2012 22:13:20 +0800 (MYT)
User-agent: SquirrelMail/1.4.9a

>> Change request for the socket API.
>>
>> Would it be possible to add an socket offset to the socket API so the
>> socket number is increased with the defined number?
>
> The general idea is good, but I don't see why you need to change the lwIP
> sources for that: you'd have to re-implement read/write/close/ioctl/fnctl
> anyway to call the correct subsystem. Doing that, you can
> increase/decrease the file descriptor in a central place in these wrapper
> functions before/after calling the correct subsystem.

Because then you would need to build a wrapper for all socket only
functions (accept/bind/connect/listen etc.) too. It would also force you
to build a wrapper function for select/FD_SET/FD_CLR/FD_ISSET/FD_ZERO (I
only use for LwIP) which would cause a lot more load on embedded systems.
On the downside, if you would use another library with the same
functionality (a pipe library for example) you would need to build a
wrapper anyway...

So I'm off writing a wrapper... thanks for your time! :)




reply via email to

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