in ref documents, WiFi - client.available() returns the number of bytes available for reading.
but in above source code, When connected to the server, availavble() rerurns always 1 regardless of whether the server sends a message or not.
and When connected to the server, the program doesn’t seem to execute beyond line 37 in the source code. The code beyond line 37 executes only when the connection to the server is terminated.
(of course, It works correctly on the ESP32 platform with the same source code)