[Top][All Lists]
[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: |
Mon, 4 Apr 2011 08:30:20 +0200 |
>> I'm not a TCP/IP or HTTP expert but I think it is possible to response
>> for SYN packet of second connection just after first one drops. Then
>> it would work as fast as my microcontroller can.
>
> It would make the behaviour of the stack very specialised for your particular
> use case. It would require that the stack knew that you wanted to do it that
> way, and for it to know that the SYN was for your PCB, and that you already
> had an active connection accepted via the same PCB. None of these are
> usually of concern to the stack when a SYN arrives.
>
> Going back to the start, can you explain why you need to limit it to a single
> connection? Is it just that there is little memory and so you don't want
> extra connections using it up?
>
> It sounds like what you want is for the stack to accept the incoming
> connection, but for your server to not have to do anything with it until it
> is ready. Perhaps you could allow more than one connection, and just process
> them serially in your web server? E.g. whenever the accept callback is
> called, put the new PCB in a list but do nothing with it, and whenever a
> connection is closed pull the oldest PCB off the list and start using that
> one, and so on.
When I set MEMP_NUM_TCP_PCB to 1 I have almost what I want - it's just
too slow! Is it possible to speed up TCP processes by calling some
function few times, for example tcp_tmr?
And Yes, I want to limit connection to only one because I don't have
space in RAM for 2 or more HTTP requests
I tried to do want you are writting about, but maybe I do something
wrong, because it doesn't work. I tried to accept second connection
and save its pcb, arg and err, but do not bind any callbacks to this
pcb until first connection drops. When first connection drops I bind
callbacks but data received callback isn't called. When I send new
data in second connection they are received as normal, but browser
will send data at once after connection when callbacks aren't bound so
I wan't received it.
I use lwIP 1.3.0.
Tomasz
- Re: [lwip-users] disconnect - connect delay, (continued)
- Re: [lwip-users] disconnect - connect delay, brak brak2, 2011/04/01
- Re: [lwip-users] disconnect - connect delay, Kieran Mansley, 2011/04/01
- Re: [lwip-users] disconnect - connect delay, brak brak2, 2011/04/01
- Re: [lwip-users] disconnect - connect delay, Kieran Mansley, 2011/04/01
- Re: [lwip-users] disconnect - connect delay, brak brak2, 2011/04/01
- Re: [lwip-users] disconnect - connect delay, Kieran Mansley, 2011/04/01
- Re: [lwip-users] disconnect - connect delay, brak brak2, 2011/04/01
- Re: [lwip-users] disconnect - connect delay, Kieran Mansley, 2011/04/01
- Re: [lwip-users] disconnect - connect delay, brak brak2, 2011/04/01
- Re: [lwip-users] disconnect - connect delay, Kieran Mansley, 2011/04/01
- Re: [lwip-users] disconnect - connect delay,
brak brak2 <=
- Re: [lwip-users] disconnect - connect delay, brak brak2, 2011/04/04
- Re: [lwip-users] disconnect - connect delay, Simon Goldschmidt, 2011/04/04
- Re: [lwip-users] disconnect - connect delay, brak brak2, 2011/04/04
RE: [lwip-users] disconnect - connect delay, Bill Auerbach, 2011/04/01