Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remoteIP() and remotePort() return only 0 #6

Closed
edautz opened this issue Oct 25, 2017 · 1 comment
Closed

remoteIP() and remotePort() return only 0 #6

edautz opened this issue Oct 25, 2017 · 1 comment

Comments

@edautz
Copy link

edautz commented Oct 25, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant