-
with the code as follow
it seems that client.connect connects to a host every second call (or rather client.stop disconnects) every second call. Serial monitor: At the first client.connect and then only when "1", the message reaches a host. I am using Nucleo F746ZG board. What's the problem/solution? |
Beta Was this translation helpful? Give feedback.
Answered by
fpistm
Feb 5, 2024
Replies: 1 comment 2 replies
-
not using client.stop is a sort of "quick fix" ...but it's not the way it should be. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @xRadx
Well, my guess is that opening, closing take more time you think. The LwIP set the cocket at
TCP_CLOSING
state and it does not close immediately.There some other mechanism in LwIP using the
TCP_WAIT
and other.So you have to take in account.... having a connect each 10s is not really usefull... simply stay connected.