Re: [lwip-users] lwip raw TCP client.

2012-06-05 Thread Pomeroy, Marty
> But I wonder, if both ends do close the socket normally, would the PCB end up in a TIME_WAIT? The reason for the TIME_WAIT (past the successful and ACK'd closes) is to make sure wandering left-over packets don't show up in a newly opened socket. Without the TIME_WAIT, some intermediate rout

Re: [lwip-users] lwip raw TCP client.

2012-06-05 Thread Bill Auerbach
>I am using the sockets interface, not the raw interface. I prefer to >open a listener socket on my server, and let the systems handle the Port >number details. Perhaps someone with a bit more experience in the raw >interface may be able to reply. I don't have a problem with this (RAW API) but I

Re: [lwip-users] lwip raw TCP client.

2012-06-05 Thread Pomeroy, Marty
> ... > Is this a correct approach? Mats I am using the sockets interface, not the raw interface. I prefer to open a listener socket on my server, and let the systems handle the Port number details. Perhaps someone with a bit more experience in the raw interface may be able to reply. Marty

Re: [lwip-users] lwip raw TCP client.

2012-06-05 Thread matbli
Marty, Thanks for answering. Yes you put me on the right track. Yes the it was the client PCB that was in TIME_WAIT. Firstly I had not understood that I should call the tcp_tmr() for lwip timer functions to work. Secondly I figured out that when the TIME_WAIT for the PCB has elapsed it is re

Re: [lwip-users] lwip raw TCP client.

2012-06-04 Thread Pomeroy, Marty
Mats The behavior of sockets, even after being closed, they stick around for a little while in TIME_WAIT state. This allows acks to complete, etc. You cannot re-open that socket until that expires. For more details, Google TIME_WAIT. If you wait a couple of minutes, can you then reconnect? If

[lwip-users] lwip raw TCP client.

2012-06-04 Thread matbli
Hi, I'm trying t write a TCP client using lwip. I have started with functionality to open and closing a socket using raw API. Opening a socket using: rTcpConnect=tcp_connect(tcp_pcb, &ip, 2020, mainTcpConnectAccept); Works fine, as it seems. My test server says new client IP=xxx.xxx.xxx.xxx.