lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] query netconn connection ...


From: Teratux
Subject: [lwip-users] query netconn connection ...
Date: Tue, 19 Oct 2010 22:50:29 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1

Hi .. I have an multithreaded application that I managed to create to use an existing connection resource using the timeout option on the listener thread.  When the timeout expires the connection wait I want to query in the code below if that really ocurred or some error of another sort ( a network failure of some sort or a disconnection from the other party ).  I'm using lwIP on FreeRTOS ...

in = netconn_recv(pNewConnection);

                if ( in != NULL )
                {
                    netbuf_data(in, (void*)&pBuff, &len);

                    i = 0;
                    while( i < len )
                    {
                        if( xQueueSend( handleUpr, &pBuff[i++], 200 ) == pdPASS )
                        {
                            vParTestToggleLED(1);
                        }
                    }
                    netbuf_delete(in);
                }

                // HERE

In the "// HERE" comment I want to verify if the netconn_recv command really timed out or if an error ocurred.  How can I accomplish this ... ?

Thanks ...

reply via email to

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