|
From: | Sebastian Paluch |
Subject: | [lwip-devel] MSG_WAITALL socket recv flag needed |
Date: | Wed, 9 Jun 2010 12:02:37 +0200 |
Hello, I need MSG_WAITALL flag for lwip_recvfrom
function. I don’t see this in latest CVS head revision and probably this
will not be there before 1.4 release, so I have tried with something like this: Line 546: if
(netconn_type(sock->conn) == NETCONN_TCP) {
LWIP_ASSERT("invalid copylen, len would underflow", len
>= copylen); len -=
copylen; if (
(len <= 0) ||
(((flags & MSG_WAITALL)==0)
&& ((buf->p->flags
& PBUF_FLAG_PUSH) || (sock->rcvevent
<= 0))) ||
((flags & MSG_PEEK)!=0)) { done =
1; } } else { done = 1; } I this solution, the receive request will
complete only when one of the following events occurs: ·
The buffer supplied by the
caller is completely full. ·
The connection has been closed. ·
The request has been canceled
or an error occurred. In case of conflicts with MSG_DONTWAIT or O_NONBLOCK,
the MSG_WAITALL would be silently ignored. I wonder if this covers everything and I
can go further with this? I would also like to know if it would be possible to
have MSG_WAITALL flag in official release? Thanks Pozdrawiam/Best regards/Mit
freundlichen Grüßen Sebastian Paluch Woodward Governor Poland Sp. z o.o. P Please
consider the environment before printing this email. |
[Prev in Thread] | Current Thread | [Next in Thread] |