This repository was archived by the owner on Jan 20, 2025. It is now read-only.
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
remoteIP() and remotePort() return only 0 #6
Closed
Description
When using remoteIP() and remotePort() to catch the connected client ip address provides only 0's.
Code:
AsyncWebServer server(80);
AsyncClient remoteclient;
// respond to GET requests on URL /heap
server.on("/heap", HTTP_GET, [](AsyncWebServerRequest *request){
Serial.println(remoteclient.remoteIP().toString());
Serial.println(remoteclient.remotePort());
request->send(200, "text/plain", String(ESP.getFreeHeap()));
});
Output:
0.0.0.0
0
Rest of my webserver code is running fine.
Using github version of:
AsyncTCP-master-24102017.zip
ESPAsyncWebServer-master-24102017.zip
arduino-esp32-master_v3.0-dev-899-g3a271a4a_19102017.zip
Arduino IDE 1.6.12 running on doitESP32devkitV1
Bug or are do I something wrong?
Metadata
Metadata
Assignees
Labels
No labels