ESP8226 WiFi Shield and linkID

So I have been playing with my ESP8226 WiFi Shield (WRL-13287) and a RedBoard.

#include <SparkFunESP8266WiFi.h>

I have successfully connected to my home WiFi and to a port on a server I have which happens to be a MQTT broker.

So far no problems here.

Wanted to dig into the SparkFunESP8266WiFi library just to see some of the other published functions and commands.

Was looking at SparkFunESP8266WiFi.h and SparkFunESP8266WiFi.cpp in the library and noticed a reference to…

uint8_t linkID

for some of the TCP/IP Commands.

I see linkID defined in the header file in the struct esp8266_ipstatus but it appears not appear to be used.

How do I find/get the linkID? This is just for general knowledge in case I want to do some simple TCP connections in the future.

Thanks…John

In ‘theory’ 5 (ESP8266_MAX_SOCK_NUM) clients can be connected to the server ESP8266 WIFI-shield driver at the same time. Each client connection has their own specific data which is captured in the structure ‘esp8266_ipstatus’. LinkID is an index, assigned during connect, to structure for that client connection. With LinkID different client connections can be maintained and addressed correctly.

In ‘practice’ however the sketch and driver software assumes on many places that only one client is connected at the same time.