[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Last call for 1.4.0rc1 issues
From: |
Martin Velek |
Subject: |
Re: [lwip-users] Last call for 1.4.0rc1 issues |
Date: |
Mon, 20 Sep 2010 14:36:52 +0200 |
Hello,
I would like to open discussion about sending data over LWIP socket
API(1.4.x) in the non-blocking or MSG_DONTWAIT mode.
The current implementation returns always EMSGSIZE if data size is
more than ((size > TCP_SND_BUF) || ((size / TCP_MSS) >
TCP_SND_QUEUELEN)). I cannot find exact description of this situation
but I think that lwip should send as much as possible(and returns
less than required) and if the output buffer is full it would return
-1 with error EAGAIN or EWOULDBLOCK.
I have discovered this behavior during playing with xavante http
server + luasockets and LWIP socket API. Every accepted connection has
option TCP_NODELAY and O_NONBLOCK. Every attempt to send data(larger
html page) failed with EMSGSIZE.
I have tried similar behavior with Ubuntu 10.04.1 LTS,
setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (int *)&optval, sizeof(optval));
fcntl(sockfd, F_SETFL,O_NONBLOCK);
perror("");
n = write(newsockfd, buff, x);
perror("");
Only with big x (e.g. 655360) there is
Success
Success
n = 212992
Regards,
Martin
On 16 September 2010 15:23, Kieran Mansley <address@hidden> wrote:
> If anyone knows of any problems with lwIP 1.4.0rc1 and they haven't yet
> published them, please do so. If I don't hear of anything major I'll
> make the proper release.
>
> Thanks
>
> Kieran
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>