RST interrupt

Hello, on a W5500, is it possible to know when it responds RST to a SYN because the sockets are occupied ?
For my application 8 sockets are too few, so I wanted to move the sockets from one server to another on demand based on traffic.

On another topic, in the DHCP client written by WizNet when it receive a valid IP from the server and the status changes to STATE_DHCP_LEASED, is it possible to close the socket while waiting the lease to end?

Thank you

As far as I know no, the RST is sent in background and your software will not be notified about connection request rejection.

DHCP works using specific algorithm, and when you obtained IP address the DHCP job is finished, this socket may be reused for other communication. You do NOT need to keep socket open or leaving it alone as soon as DHCP process has finished.

Thank you Eugeny. That’s really unfortunate for me. Is there any WizNet new chip with more than 8 sockets?

At present no, according to this web page. AFAIK you are not expected to make high-end networking devices basing on these chips. What you can control is freeing socket(s) as early as possible into listening mode. Next, you can design remote software to try another IP address (another server) if it receives RST from current IP address (therefore move this socket selection functionality from W5500 driver to remote software).