lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip tcp hangup


From: vincent cui
Subject: Re: [lwip-users] lwip tcp hangup
Date: Thu, 1 Sep 2011 09:07:11 +0000

Plus your accept() loop has a delay after each successful accept!


while (1) 
        {
        clientfd = lwip_accept(lSocket, (struct sockaddr*)&client_addr, 
&addrlen);
                if (clientfd > 0)
                {
                        xTaskCreate( httphandler, NULL, 128, (void *)&clientfd, 
HTTP_TASK_PRIORITY, NULL );
                        vTaskDelay(100);
                }
                else
                {
                        lwip_close (clientfd);
                }
    }


I have added it after accept loop.... 

锘?Vincent Cui
Sr.Firmware Engineer
Mobile: +8613482482211
Tel: +86 21 34612525x6104
Fax: +86 21 34619770
E-Mail: address@hidden
Shanghai EnLogic Electric Technology Co., Ltd.
Address: 1104-1106, Building A, No.391, Guiping Road, Xuhui District, Shanghai, 
200233
http://www.enlogic.com

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Simon Goldschmidt
Sent: 2011年9月1日 17:03
To: Mailing list for lwIP users
Subject: Re: [lwip-users] lwip tcp hangup


vincent cui <address@hidden> wrote:
> The httphandler definition as followed, please help me to check ...
> It only return a daynamic web page.... 

I'm not sure the code below is a valid webserver, as it seems to mirror back 
received data.

As to the parallel connections: the httphandler function has no delay up to the 
line 'send(..., webpage, ...)' (as the recv should already be in the buffers 
and the send() before can also be buffered). Plus your accept() loop has a 
delay after each successful accept! And if sizeof(WebSide) is small enough, the 
last send can also be buffered, so the whole httphandler function could be 
faster than the delay in the accept loop...

> For FRTOS configuration, I configure it as PREEMPTION

As I said, I don't know anything about FreeRTOS except for recognizing some 
function names...


Simon
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

reply via email to

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