[Top][All Lists]

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

[lwip-devel] [patch #5959] Implement SO_RCVTIMEO for accept and recv (on

From: Frédéric Bernon
Subject: [lwip-devel] [patch #5959] Implement SO_RCVTIMEO for accept and recv (on TCP netconn)
Date: Wed, 23 May 2007 10:32:22 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/20070309 Firefox/


                 Summary: Implement SO_RCVTIMEO for accept and recv (on TCP
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: fbernon
            Submitted on: mercredi 23.05.2007 à 12:32
                Category: None
                Priority: 3 - Low
                  Status: None
                 Privacy: Public
             Assigned to: fbernon
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any



It's a very simple patch I propose :

for netconn_accept, in api_lib.c :

    if (sys_arch_mbox_fetch(conn->acceptmbox, (void *)&newconn,
conn->recv_timeout)==SYS_ARCH_TIMEOUT) {
      newconn = NULL;
    sys_arch_mbox_fetch(conn->acceptmbox, (void *)&newconn, 0);
#endif /* LWIP_SO_RCVTIMEO*/

for netconn_recv, it the same thing.

No more code for users using LWIP_SO_RCVTIMEO=0, a little bit for users using
LWIP_SO_RCVTIMEO=1 (+2 tests and +2 set).

For accept, it's very useful when you want to stop some services (some others
stack allows to do a "close" on a socket currently use in a "accept", but
don't try with lwIP ;) )


Reply to this item at:


  Message posté via/par Savannah

reply via email to

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