lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Flags in socket interface


From: Kieran Mansley
Subject: Re: [lwip-users] Flags in socket interface
Date: Thu, 14 Oct 2010 10:05:24 +0100

On Wed, 2010-10-13 at 11:11 +0200, Christian Steffen wrote:
> 
> I am a little bit confused about the flags at the socket interface.
> The 
> sockets.h says that only MSG_WAITALL and MSG_OOB not implemented. So
> I 
> would use MSG_MORE. But when I look into the socket.c I couldn't see
> any 
> implementation of a flag. Is it so?

It's a bit hard to track - MSG_MORE is translated to NETCONN_MORE and
then tested (in tcp_write()) using TCP_WRITE_FLAG_MORE.  We're relying
on all these constants being the same and clearly the code in this sense
is not ideal.

In your later email you say that you're using a UDP socket.  What affect
do you expect MSG_MORE to have?  I can see in some documentation for
send that there has been a relatively recent extension in Linux:

"Since Linux 2.6, this flag is also supported for UDP sockets, and
informs the kernel to package all of the data sent in calls with this
flag set into a single datagram which is only transmitted when a call is
performed that does not specify this flag."

We don't support that at the moment I'm afraid.  The easiest way to get
that behaviour is to batch things together in your app and then make a
single send call.

Kieran




reply via email to

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