lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LwIP 1.4.1: Outgoing TCP connection does not work - not


From: Marco Jakobs
Subject: Re: [lwip-users] LwIP 1.4.1: Outgoing TCP connection does not work - not able to send data on nonblocking TCP connection!
Date: Wed, 19 Dec 2012 15:18:04 +0100

Dears,

 

some more information after more debugging.

 

LwIP also sends out the RST,ACK in 1.4.0, but this does not affect the communication. Seems to be a side effect from a previous existing, not currently closed connection on the server.

 

With single step debugging, I've found the exit cause of my netconn_write:

 

In the function netconn_write_partly (api_lib.c) this is causing the exit:

 

  dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK);

  if (dontblock && !bytes_written) {

    /* This implies netconn_write() cannot be used for non-blocking send, since

       it has no way to return the number of bytes written. */

    return ERR_VAL;

  }

 

So it seems that I can't write anything on a non-blocking TCP connection???

How should I use such a connection when I'm not able to put out any data on it? What is the reason for this change?

 

I need the non-blocking for the connection setup (netconn_connect), so do I need to reset the nonblocking feature right after the establishment of the connection with the line

 

netconn_set_nonblocking(ssrv_netconn[nconn-1].conn, 0);

 

?

I would be really interested in the reason of this change … and about the suggested use for non-blocking connections (which are phantastic for the use with the callback functions, having a ip handling task for handling multiple connections …)

 

 

 


reply via email to

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