When an incoming request comes in I can see how to get the clientIP using code like this:
Code: Select all
int _socket = accept(serverSocketID, (struct sockaddr * )&_sockAddr, &_addrLen);
...
struct sockaddr_in *sockAddrIn = (struct sockaddr_in *)(&_sockAddr);
IPAddress clientIp(sockAddrIn->sin_addr.s_addr);
I need to know if the request came from a client connected to the ESP as a AP or STA
Thanks