lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] tcp_listen_with_backlog [RAW]


From: Chris_S
Subject: [lwip-users] tcp_listen_with_backlog [RAW]
Date: Mon, 27 Jul 2009 03:03:42 -0700

Well I found the source of my TCP dying on the 3rd page refresh:
tcp_listen()

I had the lwipopts.h set to:

#define TCP_LISTEN_BACKLOG                        1
#define TCP_DEFAULT_LISTEN_BACKLOG    5

and the server HTTP.c module was calling "tcp_listen()"
That caused the problem.  It was a backlog issue.

I set:

#define TCP_LISTEN_BACKLOG                      0

and no problem with multiple page refreshes.

However I then modified the server HTTP.c so it calls

if  (TCP_LISTEN_BACKLOG==1)
    tcp_listen_with_backlog(pcb,backlog)
        else tcp_listen(pcb)

My question is, what is the "backlog" param value suppose to be?
I set it to TCP_DEFAULT_LISTEN_BACKLOG.

So far, if I try to use the backlog function, it doesn't keep working.
It keeps exiting at:

#if TCP_LISTEN_BACKLOG
    if (pcb->accepts_pending >= pcb->backlog) {
   printf("ERROR! pcb->accepts_pending >= pcb->backlog\n");
      return ERR_ABRT;
      }
#endif /* TCP_LISTEN_BACKLOG */

in "tcp_listen_input()" in TCP_IN.H.


Is this backlog function not working?  Not working in Raw?

What's the story on using this "tcp_listen_with_backlog()"

Thanks, Chris.









reply via email to

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