Hi,

I am using netcon api in simple application. Device is a server
processing connections in loop, PC is a client. After PC establishes
connection we go into simple loop:

    while (err == ERR_OK) {
        if (streaming_enabled()) {
            err = netconn_write(pc,sbuf, 1152, NETCONN_COPY);
        }
        vTaskDelay(1);
    }

where pc is struct netconn *.

However if streaming is disabled, there is now way we can detect that
PC sent FIN and closed connection - so subsequent connection to same
port to server causes RST (we are still in inner loop so we cannot
accept next connection).

What can i do to detect that PC closed connection? I do not mean
Ethernet layer error and other "hard do diagnose in few miliseconds"
problems, rather typical situation with connection closed by PC.

Regards,
Krzysztof Wesołowski,

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to