lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #8764] Allow backlog to be updated


From: Joel Cunningham
Subject: [lwip-devel] [patch #8764] Allow backlog to be updated
Date: Thu, 08 Oct 2015 16:57:03 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0

URL:
  <http://savannah.nongnu.org/patch/?8764>

                 Summary: Allow backlog to be updated
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jcunningham
            Submitted on: Thu 08 Oct 2015 04:57:01 PM GMT
                Category: sockets/netconn
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: jcunningham
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

I've created a patch that adds support to the sockets/netconn layer for
updating the backlog of a listening socket.  Reducing the size of the backlog
will not abort queued connections, but instead prevent new connections until
pcb->accept_pending < pcb->backlog

This is supported on POSIX systems by calling listen again with the new
backlog value when the socket is already in the listen state:
http://manpages.ubuntu.com/manpages/jaunty/man2/listen.2freebsd.html

Winsock allows calling listen again once in the listen state, but doesn't
adjust the backlog value:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms739168%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

Open Group doesn't specify this as a required behavior, but it was really easy
to support on LwIP

http://pubs.opengroup.org/onlinepubs/009695399/functions/listen.html

The patch also adds a macro for setting the backlog, ensuring that the backlog
is not set to 0 (this logic was previously in tcp_listen_with_backlog())



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 08 Oct 2015 04:57:01 PM GMT  Name:
0001-Allow-backlog-to-be-updated.patch  Size: 3kB   By: jcunningham

<http://savannah.nongnu.org/patch/download.php?file_id=35105>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8764>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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