We have used lwip in chip to communicate with server which use Netty( one Java library for TCP/IP programming ).
There is one problem: when the chip client restart very fast, in just 4-5 seconds, connected to sever successfully, and could send heart beat data to server, but the server CAN NOT send data to client. Did this problem caused by the "REUSE PORT" on client side? Because the last TCP port is in one invalid Status, and then the client use the same port intend to build one new TCP connection, and the server send data to client failed.
If I guessed correctly, you seem to be talking about the TCP reopen
issue, but your scenario is not clear to me.
You have an lwIP client connecting to a server
Someone closes the connection, or it is lost somehow.
The client retries the connection, does it succeed ? Apparently it does.
If connection succeeds, then both ends must be able to talk to each
other, if this does not happen, then it is not a socket reuse issue but
a bug somewhere.
If connection does not succeed, what is the reason, the result code ?
Unless you setup so_reuseaddress, then you have to wait, but connection
either succeeds or not, there is no "ok, connect but data flows in only
one direction" unless there is a bug. What do you mean by "the port is
in an invalid status" ?