[Top][All Lists]

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

[lwip-users] TCP write won't work after netconn_recv timeout

From: fepgmbh
Subject: [lwip-users] TCP write won't work after netconn_recv timeout
Date: Thu, 8 Oct 2009 06:00:02 -0700 (PDT)

Hi to all,

for the last hours i try to solve a problem with a TCP write and receive.
First, the implementation of the receive function netconn_recv is not as
lucky as this will not return by default.

But with information on this list, i reconfigured the netconn_recv to use
the timeout:

  tgtxcon->recv_timeout=1000; // Waits for 1s
  txbuf=netconn_recv(tgtxcon);  //Receive Data

This will time out after 1s if nothing was received in the meantime.

But with this, there is now another problem. I'll post a summary of my

First, the TCP connection is opened and established. This works pretty good.
Then i'll send a first packet of 6 bytes over the connection:


In wireshark i see the packet being transmitted properly. Now i check if
some data arrives to me over the connection:

  tgtxcon->recv_timeout=1000; // Waits for 1s
  txbuf=netconn_recv(tgtxcon);  //Receive Data

If nothing was received, the pointer to txbuf is not assigned so i can check
if anything was received or not.

Now comes the problem: After nothing was received and the netconn_recv timed
out, i loop back sending again the request after 2 seconds:


Now, since the first receive timeout happened, the netconn_write won't work!
There is nothing sent over the TCP connection!

Has anybody an idea concerning this issue? Otherwise, to avoid hanging
around in the netconn_recv when no answer is received, is there any kind of
possibility to "check" if a packet for my connection is waiting so i can
pull it out by the netconn_recv only if there is data available?

I'm really helpless about my receive side of my transmission and hopes
someone has a suggestion for me ;-)

View this message in context: 
Sent from the lwip-users mailing list archive at Nabble.com.

reply via email to

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