Hi,
I need to connect the w5500 always with the same server and I send it a post request.
When I run the code I notice this:
If I send multiple requests with time intervals < 5 sec the server responds and the socket satus is in SOCK_ESTABLISHED if the time interval is > 5 sec the socket status is SOCK_CLOSE_WAIT.
My question is:
- Can I avoid the SOCK_CLOSE_WAIT?
2)If I can’t avoid this, How can I disconnect and reconnect using the same port 443?
I do:
disconnect(sock_num)
socket(sock_num,Sn_MR_TCP, 443,SF_TCP_NODELAY );
connect(sock_num, target_ip,443);
but I can’t reconnect. - The code takes a long time to execute:
mbedtls_ssl_handshake
in the state: MBEDTLS_SSL_CLIENT_KEY_EXCHANGE
If I need to connect at the same server can I do the mbedtls_ssl_handshake only the first one? How can I do thies?
Thanks in advance.