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 implementation: 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: netconn_write(tgtxcon,tmserout.buf,6,NETCONN_COPY); 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: netconn_write(tgtxcon,tmserout.buf,6,NETCONN_COPY); 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: http://www.nabble.com/TCP-write-won%27t-work-after-netconn_recv-timeout-tp25802971p25802971.html Sent from the lwip-users mailing list archive at Nabble.com. _______________________________________________ lwip-users mailing list lwip-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/lwip-users