I am trying to create a simple WiFi TCP Server, but I'm stuck. The TCP server will receive a String, should pass the String to another method which will return another String of values. The returned String has to be sent back to the TCP client.
client.read() returns a single byte so you cannot compare it with String, hence the error You need to use a function that returns a String, perhaps readStringUntil() as long as the incoming String is terminated in some way
But do you know, why I'm getting two responses from the server?
When I'm sending (for example) "1", and executeCommand returns (for example) "Hello" I'm getting the response
"Hello" from the server and instantly after this response I'm getting a empty response.