> I think you'd be better limiting the number of connections by modifying
> the webserver to only accept one at a time rather than trying to enforce
> this at the TCP level.
>
> Kieran
>
But how can I do this? I init TCP like this:
pcb = tcp_new();
err = tcp_bind(pcb, IP_ADDR_ANY, 80);//PORT HTTP
pcb = tcp_listen_with_backlog(pcb, 1);
tcp_accept(pcb, HTTP_connection_established);
When I allow 2 connections I have to reject second one in
HTTP_connection_established:
static err_t HTTP_connection_established(void *arg, struct tcp_pcb
*pcb, err_t err)
{
if (HTTPActiveConn)
{
_error("abort");
tcp_abort(pcb);
return ERR_OK;
}
....
}
This causes Abort state in browser for some of elements - they just don't load.
I don't want to handle simultaneous connections.
Tomasz
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users