energia/Energia — pull request #480 by spirilis (2014-09-30 18:47:55+00:00)
Title: AP mode: Track client connects & disconnects

Placeholder for a pull request - I have written some code that combines the SimpleLinkCallbacks.cpp in utility/ with some new static variables and functions in WiFiClass which track client connects (IP/MAC) and disconnects.

A user may poll and inform about these using code similar to this:
```
static int knowndevs = 0;
int nowdevs = 0;

nowdevs = WiFi.getTotalDevices();
if (nowdevs > knowndevs) {
Serial.print("Client connected! IP = ");
WiFi.getLatestDevice().printTo(Serial);
Serial.println();
}
if (nowdevs < knowndevs) {
Serial.println("Client disconnected.");
}
knowndevs = nowdevs;
```

Attaching my phone to this AP and then disconnecting, the output looks like:
```
Client connected! IP = 192.168.1.2
Client disconnected.
```