lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] disconnect - connect delay


From: brak brak2
Subject: Re: [lwip-users] disconnect - connect delay
Date: Fri, 1 Apr 2011 14:09:30 +0200

>> From documentation, abuot tcp_listen_with_backlog function:
>> (...) Setting the connection to LISTEN is an irreversible process.
>
> It is irreversible in that you can't make it back into a "normal" pcb,
> but you can still close it, then do exactly what you're doing now (i.e.
> allocate, bind, listen, accept) when you want to make a new listening
> socket.

I put tcp_close(ListenPcb) in connection established callback and
                ListenPcb = tcp_new();
                tcp_bind(ListenPcb, IP_ADDR_ANY, 80);//todo: PORT HTTP
                ListenPcb = tcp_listen_with_backlog(ListenPcb, 1);      
                tcp_accept(ListenPcb, HTTP_connection_established);
in connection closing function.

Now the webside is loading much faster, but still sometimes there are
delays. I think delays appears the browser asks for more then 2
element at once.



reply via email to

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