WIFI Module AP Mode
Access Point provides wireless access services and allows other wireless devices to access. It also provides data access. Wireless router and wireless bridge work in this mode.
WIFI module STA Model
Station is similar to wireless terminal. STA itself does not accept wireless access, it can connect to AP and wireless network card is working in the model.
WIFI Module TCP Server
TCP listening and waiting for the network client connection. It is similar to the WIFI AP mode. It itself is not active to connect. It is waiting for the TCP Client to connect.
WIFI Module TCP Client
Provide a client connection to TCP network service. Similar to the STA model WIFI, initiative to connect to TCP Server.
AP and STA of wifi module has no necessarily link with TCP Server and TCP Client. AP wifi module can be used as either TCP Server or TCP Client. Also the STA wifi module could act as either TCP Server or TCP Client.
But for communication, STA must connect to AP and TCP Client connects to TCP Server.