On 1 Apr 2011, at 16:46, brak brak2 wrote: > 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. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
