[Top][All Lists]

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

Re: [lwip-users] Netconn API and nonblocking connect - how to proceed af

From: Simon Goldschmidt
Subject: Re: [lwip-users] Netconn API and nonblocking connect - how to proceed after unsuccessful connection
Date: Mon, 23 Jul 2012 17:29:15 +0200

"Marco Jakobs" <address@hidden> wrote:
> [..]
> 3. Try to connect to the remote host
>             err = netconn_connect
> (ssrv_netconn[ssrv_conn[f].netconn[0]-1].conn, &ssrv_addr, port);
> // Verbindung öffnen
>             err returns as -4 (in progress)
>             As the host is not running a service on this port, the
> callback
> immediately returns the ERROR

What do you mean here with "ERROR"?

> 4. The ERROR causes the handler to wait the given seconds for this
> connection
> 5. For the next attempt, go again to step 3 (netconn_connect) to try again
> to connect
>             -> But now I'm always getting back the error code -12

That doesn't work because some 2 or 3 years ago, we decided that it's safer to 
not support reconnect (after having a discussion on one of the lists). If I 
remember correctly, I think the argument was that calling connect() twice on a 
socket did not work on some other platform and that it's just as easy to close 
the socket and create a new one... And after all, that it's not a time-critical 
path and so the overhead of closing and reopening would not matter...


reply via email to

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